function_call_validate
Validate an LLM function call / tool_use output: check that function name is in allowed list, arguments match expected schema (types, enums, ranges), no extra/missing args. Reads the definitions as OpenAI (parameters), MCP (inputSchema) or Anthropic (input_schema) write them, or as plain required_args/optional_args; reads the call as arguments (object or JSON string), input (Anthropic tool_use) or an OpenAI {function:{…}} wrapper.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"function_call": {
"name": "get_weather",
"arguments": {
"city": "Paris"
}
},
"allowed_functions": [
{
"name": "get_weather",
"required_args": [
"city"
]
}
]
},
"name": "function_call_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function_call | Yes | The function call object from LLM (e.g. { "name": "get_weather", "arguments": {"city":"Paris"} }) | |
| allowed_functions | Yes | List of allowed function definitions, in OpenAI, MCP or Anthropic form, or as {name, required_args, optional_args} |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | No | ||
| errors | No | ||
| error_count | No | ||
| function_name | No | ||
| provided_args | No | ||
| required_args | No |