Tool Fixes
Fix tool configuration and behavior.
Held for the beta
This feature is built. It is not available in this release. It has no release date. This page describes it as designed.
Tool fixes describe configuration changes for tool calls.
Configuration-Only Fixes
The fix runtime has no applier for tool fixes: a tool fix that reaches it is dropped without being applied (see Fix Runtime). A tool fix describes a configuration change for you to make in your own tool-calling code; nothing in Risicare applies it.
Use Cases
- Add timeouts
- Validate inputs
- Transform outputs
- Add error handling
Configuration
{
"fix_id": "fix-tool-001",
"fix_type": "tool",
"config": {
"tool_name": "search_api",
"timeout_ms": 30000,
"input_validation": {
"max_query_length": 1000
}
}
}Options
Timeout
{
"fix_type": "tool",
"config": {
"tool_name": "external_api",
"timeout_ms": 60000
}
}Input Validation
{
"fix_type": "tool",
"config": {
"tool_name": "search",
"input_validation": {
"required_fields": ["query"],
"max_field_length": {
"query": 500
},
"allowed_values": {
"type": ["web", "news", "images"]
}
}
}
}Output Transformation
{
"fix_type": "tool",
"config": {
"tool_name": "fetch_data",
"output_transform": {
"truncate_to": 10000,
"extract_fields": ["title", "content"],
"remove_html": true
}
}
}Error Mapping
{
"fix_type": "tool",
"config": {
"tool_name": "api_call",
"error_mapping": {
"404": "Resource not found",
"429": "Rate limited, please retry",
"500": "Server error, please retry"
}
}
}Common Fixes
Prevent Timeout
{
"fix_type": "tool",
"config": {
"tool_name": "slow_api",
"timeout_ms": 120000,
"chunk_large_inputs": true,
"max_input_size": 50000
}
}Fix Invalid Arguments
{
"fix_type": "tool",
"config": {
"tool_name": "search",
"input_coercion": {
"query": "string",
"limit": "integer"
},
"default_values": {
"limit": 10
}
}
}