Describe the function
Include a tool definition in a Responses request. Use a focused name and a JSON Schema for its arguments:Tool definition
tools entry, not a complete request. Keep the model, input, and any conversation settings in the enclosing Responses request.
Handle a function call
Inspect the response output forfunction_call items. Each item identifies the function, JSON-encoded arguments, and a call_id.
Before executing a call:
- Check the function name against the functions your application supports.
- Parse and validate the arguments.
- Check the authenticated user’s permission to perform the operation.
- Execute the operation and collect its result.
Return the result
Send afunction_call_output item using the matching call ID, and continue from the preceding response:
Continuation payload
Complete workflows
- Subagents implements the full loop, including multiple function calls and results.
- Deep research applies that pattern to research tasks.
- MCP tools lets MKA1 call an external tool server directly.