Tools and connected apps
Choose web search, connected apps, or custom MCP and understand who executes tools.
Choose the integration
| Need | Request option | Setup |
|---|---|---|
| Current public information | web_search: true | Search guide; a search-capable route. |
| Data in connected applications | tools: [{"type":"kendr_app","selection":"auto"}] | Connect the application to the same Kendr account first. |
| Your own service through MCP | tools: [{"type":"kendr_mcp","server_id":"mcp_..."}] | Register a trusted server. |
Understand the execution boundary
Kendr runs two kinds of tools. Server-executed: attached MCP and connected-app tools run on Kendr’s side during generation, and you receive the completed answer. Client-executed: ordinary {"type":"function"} declarations work as in OpenAI’s function-calling guide. On /v1/chat/completions the response carries choices[0].message.tool_calls (each with an id and JSON-string arguments) and finish_reason: "tool_calls"; your code runs the function and sends the result back as a {"role":"tool","tool_call_id":...} message on the next request. Streaming responses deliver the same calls as indexed deltas.
Use client-executed functions when the operation must run inside your own network, such as a call to an internal system that Kendr should never reach. Use MCP when Kendr should call a public HTTPS service for you. The Kendr Python SDK’s kendr.grounding.ToolRunner runs the client loop for you.
Attach connected applications
Complete connector setup first. The key must belong to that account and have models:invoke. Kendr selects relevant chat-capable apps; provider credentials remain on the server.
curl https://api.kendr.org/v1/responses \
-H "Authorization: Bearer $KENDR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: connected-app-demo-001" \
-d '{
"model": "kendr-intelligent",
"input": "Find the release checklist in my connected workspace and summarize it.",
"tools": [{"type": "kendr_app", "selection": "auto"}]
}'
Design a custom tool
Start with a narrow read operation such as search_docs(query). Your MCP server implements tool discovery and invocation, authenticates requests, validates input, and returns bounded text with source URLs. A JSON function schema alone is not an MCP server.
Restrict registration to an allowlist such as search_docs and read_page. Enforce document access inside the service. For tools that change data, enforce approval in your application or tool service before committing changes; a prompt instruction alone is not an authorization mechanism.