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

  1. Confirm the tool appears in the resolved tool list for the user and organization.
  2. Confirm the model emitted the exact tool name.
  3. Find the audit record by conversationId, toolCallId, or correlationId.
  4. Check status, errorMessage, connectorId, and durationMs.
  5. Reproduce with the smallest JSON arguments that match the tool schema.
Audit lookup

Common Failures

SymptomLikely causeFix
Tool is never calledTool 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 requestThe 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 missingNo 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_errorUnknown 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 typeConfig type has no registered factory.Register the server type during MCP initialization before loading tools.
Verified end-user identity is requiredA customer-data tool ran without verified identity.Verify widget identity and pass verifiedUser or identityVerification to the tool-call handler.
Empty successful resultOwnership verification removed mismatched user-owned data.Check ownership markers in the result and compare them with the verified identity.
rate_limitedCustomer-data tool limits blocked the call.Review per-turn and per-conversation limits and inspect whether the model is looping.
budget_exceededGeneral tool-call budget blocked the call.Narrow tool usage or adjust the budget for the workflow.
timeoutTool exceeded the registry timeout or connector request limit.Reduce upstream latency, narrow the response, or tune connector limits.
circuit_openRepeated 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:

Expected server config

Check:

  • enabled is not false.
  • type matches 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.
  • organizationId matches 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.

ErrorMeaningFix
OpenAPI spec exceeds the 5MB limitThe spec is too large for conversion.Publish a smaller assistant-facing spec with only needed paths.
OpenAPI document info.title is requiredRequired OpenAPI metadata is missing.Add info.title and info.version.
paths must define at least one path itemThe spec has no operations.Add paths or correct the uploaded document.
must expose at least one enabled operationThe allow-list matched no operations.Use operation IDs, generated tool names, or METHOD /path keys that exist.
No executor registered for connector toolRegistry 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:

Narrow connector during debug

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:

Problem result

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 durationMs in 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:tools when changing orchestration behavior.

Audit Missing

Audit writes are best effort, but a healthy system should persist tool calls.

Check:

  • MONGODB_URI points 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, and correlationId.
  • Save the exact JSON arguments after identity stripping.
  • Record whether the tool is authored MCP or customer-data OpenAPI.
  • Confirm the active organizationId and connector ID.
  • Check audit status, errorMessage, and durationMs.
  • Reproduce with a direct connector test before changing model prompts.