Expand description
Argument injection middleware for tool calls.
Merges default or per-tool arguments into tool call requests before they reach the backend. Useful for injecting timeouts, safety caps, or read-only flags without requiring clients to set them.
§Configuration
[[backends]]
name = "db"
transport = "http"
url = "http://db.internal:8080"
# Inject into all tool calls for this backend
[backends.default_args]
timeout = 30
# Inject into a specific tool (overrides default_args for matching keys)
[[backends.inject_args]]
tool = "query"
args = { read_only = true, max_rows = 1000 }
# Overwrite existing arguments
[[backends.inject_args]]
tool = "dangerous_op"
args = { dry_run = true }
overwrite = trueStructs§
- Inject
Args Layer - Tower layer that produces an
InjectArgsService. - Inject
Args Service - Argument injection middleware.
- Injection
Rules - Resolved injection rules for a single backend namespace.