Skip to main content
Use MCP tools when you want the MKA1 API to call tools from an external MCP server during a response. Define the MCP server in tools. Limit which tools the model can call with allowed_tools. Use require_approval when you want your app to pause and ask the end user before the tool runs. Use X-On-Behalf-Of for the MKA1 API end user. Pass upstream MCP server credentials in the MCP tool definition.

Call an MCP tool directly

Set require_approval to 'never' when the tool can run immediately.
This is the simplest flow. The model calls the allowed MCP tool and returns the final assistant message in one request. The response output array contains:
  1. mcp_call — the model’s call to the MCP-discovered tool
  2. mcp_call_output — the data returned by the MCP server
  3. message — the model’s text response summarizing the results

Require end-user approval

Set require_approval to 'always' when your app should stop and wait for an approval decision. In this flow, create the response in background mode, poll it, and look for an mcp_approval_request item in output.
If the end user denies the tool call, send approve: false. You can also include a reason field in the mcp_approval_response item. For approval UIs, show:
  • server_label — which MCP server is being used
  • name — which tool the model wants to call
  • arguments — what arguments it plans to send

MCP tool definition reference

Credentials passed in headers are automatically masked in stored responses and streaming events.

Next steps