Use the audit log first. It records the tool name, status, duration, connector metadata, correlation ID, redacted arguments, and redacted result for each tool call that reaches the handler.
Quick Triage
- Confirm the tool appears in the resolved tool list for the user and organization.
- Confirm the model emitted the exact tool name.
- Find the audit record by
conversationId,toolCallId, orcorrelationId. - Check
status,errorMessage,connectorId, anddurationMs. - Reproduce with the smallest JSON arguments that match the tool schema.
Common Failures
| Symptom | Likely cause | Fix |
|---|---|---|
| Tool is never called | Tool was not exposed, description is unclear, or request is on the final tool round. | Check resolved tools, improve the description, and verify KOMMANDER_MAX_TOOL_ROUNDS. |
Tool is not available for this request | The model emitted a tool outside the current allow-list. | Ensure the tool was included in the tools array for that request and names match exactly. |
| Calendar tools missing | No calendar MCP config resolved, or the stored config has no refresh token. | Connect Google Calendar or Microsoft 365 under Integrations > Calendar, or set the Google Calendar env fallback. |
Calendar server fails to initialize with calendar_config_error | Unknown config.provider, missing refresh token, or missing provider client credentials (GOOGLE_CALENDAR_CLIENT_* / MICROSOFT_CALENDAR_CLIENT_*). | Fix the provider value or env vars and reconnect the calendar. |
No factory registered for server type | Config type has no registered factory. | Register the server type during MCP initialization before loading tools. |
Verified end-user identity is required | A customer-data tool ran without verified identity. | Verify widget identity and pass verifiedUser or identityVerification to the tool-call handler. |
| Empty successful result | Ownership verification removed mismatched user-owned data. | Check ownership markers in the result and compare them with the verified identity. |
rate_limited | Customer-data tool limits blocked the call. | Review per-turn and per-conversation limits and inspect whether the model is looping. |
budget_exceeded | General tool-call budget blocked the call. | Narrow tool usage or adjust the budget for the workflow. |
timeout | Tool exceeded the registry timeout or connector request limit. | Reduce upstream latency, narrow the response, or tune connector limits. |
circuit_open | Repeated connector failures opened the circuit breaker. | Fix upstream failures, then wait for the circuit state to recover or reset the connector. |
Tool Not Exposed
For authored servers, inspect the resolved server configs:
Check:
enabledis notfalse.typematches a registered factory.- Settings configs are valid because they override environment fallback configs.
- The server initializes without throwing.
listTools()returns the expected tool names.
For customer-data connectors, check:
- The connector is enabled.
organizationIdmatches the active conversation organization.- The OpenAPI spec has at least one enabled operation.
- The generated tool names do not collide with other connector tools.
- The session has verified identity before tools are exposed.
OpenAPI Connector Errors
OpenAPI connector registration validates size and structure before tools are available.
| Error | Meaning | Fix |
|---|---|---|
OpenAPI spec exceeds the 5MB limit | The spec is too large for conversion. | Publish a smaller assistant-facing spec with only needed paths. |
OpenAPI document info.title is required | Required OpenAPI metadata is missing. | Add info.title and info.version. |
paths must define at least one path item | The spec has no operations. | Add paths or correct the uploaded document. |
must expose at least one enabled operation | The allow-list matched no operations. | Use operation IDs, generated tool names, or METHOD /path keys that exist. |
No executor registered for connector tool | Registry has a generated tool but no executor. | Register the connector with an executeTool handler or load it through the customer-data connector runtime. |
Use operation allow-lists to simplify debugging:
Identity and Ownership
If a customer-data call fails identity verification:
- Ensure the widget signs identity server-side.
- Ensure the request includes the signed identity on every message that can use customer-data tools.
- Do not pass identity through tool arguments.
- Confirm identity injection rules reference supported verified identity fields.
If ownership verification empties results:
The returned marker must match one of the verified identity values. Fix the upstream endpoint, identity mapping, or tool handler so the result belongs to the requester.
Latency and Load
Tool calls within one conversation run sequentially. Long tool chains compound latency.
When latency is high:
- Check
durationMsin audit logs. - Check whether multiple tools are called in the same turn.
- Inspect upstream API response size.
- Verify connector timeouts and response-size limits.
- Run
yarn test:load:toolswhen changing orchestration behavior.
Audit Missing
Audit writes are best effort, but a healthy system should persist tool calls.
Check:
MONGODB_URIpoints to the expected database.- The app can create indexes on
tool_audit_logs. - The tool call reached
streamWithToolCalls. - The failure happened after argument parsing, not before request setup.
- Server logs for
[ToolAudit]or MongoDB errors.
Debug Checklist
- Capture
conversationId,turnId,toolCallId, andcorrelationId. - Save the exact JSON arguments after identity stripping.
- Record whether the tool is authored MCP or customer-data OpenAPI.
- Confirm the active
organizationIdand connector ID. - Check audit
status,errorMessage, anddurationMs. - Reproduce with a direct connector test before changing model prompts.