Skip to content

Function tools: document error response format and async behavior - #1260

Draft
stephenvapiai wants to merge 1 commit into
VapiAI:mainfrom
stephenvapiai:helpcenter-update/custom-tools-error-async-response-format
Draft

stephenvapiai wants to merge 1 commit into
VapiAI:mainfrom
stephenvapiai:helpcenter-update/custom-tools-error-async-response-format

Conversation

@stephenvapiai

Copy link
Copy Markdown
Contributor

Edits fern/tools/custom-tools.mdx (Function tools) to add the missing tool-response error format, clarify async-mode behavior, and cross-link the existing troubleshooting page. Reasons and supporting customer-feedback evidence are in the PR comment below.

…nction tools

The "Server Response Format" section only showed the success `result`
shape and never documented the `error` field, and Step 4's Async Mode
bullet had no explanation of `async: true` behavior. Adds the missing
error response format, the request-complete vs request-failed trigger
rule, an async-mode behavior explanation, and a cross-link to the
existing Custom tools troubleshooting page.

See PR description for the customer-feedback evidence.
@stephenvapiai

Copy link
Copy Markdown
Contributor Author

Why this change

Signal: Over the trailing 28 days, Webhook-Fern: Ask AI Conversations (the docs site's own AI assistant) logged 189 of 354 Custom Tools conversations (53%) with an unanswered outcome (silent or refused) — the highest failure rate of any topic area, well above General (40%), Default Tools (28%), and Server Webhooks (17%).

What customers were actually asking (sampled from the unanswered conversations):

  • "User asks how to handle custom tool server response format results, including toolCallId, result, and error messages."
  • "User asks about tool messages, including request-start, request-complete, request-failed, request-response-delayed."
  • "User reports an issue: the async tool setting assistant continues the conversation without waiting for the tool response."
  • "User reports an issue: when tool async false, the assistant speaks before the tool result returns, causing blocking behavior."
  • "User asks about the difference between transient tools in assistantOverrides and saved tools' tool IDs."

Content check: docs.vapi.ai/tools/custom-tools (the primary Function tools reference page) only documented the success response shape (result) — it never showed the error field, and never explained what determines a spoken request-complete vs request-failed message. Step 4's "Async Mode" bullet was a one-line label ("Enable if the tool should run asynchronously") with zero behavior explanation, which lines up directly with the "assistant didn't wait for my tool" reports. The missing pieces already exist on /tools/custom-tools-troubleshooting, but that page isn't linked from the main reference page, so neither customers nor the docs AI assistant reliably land on it.

Classification: Incomplete content (missing error format + message-trigger semantics on the primary reference page), with a secondary discoverability fix (cross-link to the troubleshooting page that already has the detail).

Fix in this PR:

  1. Added the missing error response format next to the existing result example, plus the rule Vapi uses to pick request-complete vs request-failed (presence of error, not response content).
  2. Rewrote the "Async Mode" bullet in Step 4 to state the actual async: true/false behavior and linked to the troubleshooting page's full comparison.
  3. Added a closing note pointing to /tools/custom-tools-troubleshooting for format mistakes and async/sync behavior.

No new page or nav change — this is a content-only edit to the existing page, scoped to the #1 ranked gap from this week's feedback pass. Ranking/runner-up detail intentionally omitted per the drafting workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant