Repository navigation
docs(tools): document the error field for Function tool responses - #1266
Merged
stephenvapiai merged 3 commits intoSep 28, 2026
Merged
stephenvapiai merged 3 commits into
stephenvapiai merged 3 commits into
Conversation
Customers asking Ask AI and filing support tickets about custom/Function tools repeatedly ask how to report a tool failure back to Vapi -- the Server Response Format section only showed the success `result` shape. The `error` field already exists and is used elsewhere (troubleshooting guide, API-vs-Function comparison), but was never documented on the primary Function tools guide where builders land first. Adds the `error` field, its trigger semantics (presence of the field, not its content, selects Request Failed), a failure example, and the always-return-HTTP-200 rule, cross-linked to the troubleshooting guide. Does not touch the Request Format section edited in VapiAI#1244 four days ago.
stephenvapiai
marked this pull request as ready for review
September 28, 2026 20:57
Lightsage docs evalsWaiting for the staging docs URL before running evals. Lightsage will start the selected PR evals automatically when GitHub reports a successful docs deployment for this PR. This usually happens within 15 minutes. Commit: |
stephenvapiai
enabled auto-merge (squash)
September 28, 2026 21:01
amanda-vapi
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Customer feedback from the last 28 days (support tickets, Discord, and
docs.vapi.ai's Ask AI assistant) shows Custom/Function tools as the single highest-volume, highest-failure documentation gap right now:docs.vapi.ai/tools/custom-tools(the primary Function tools guide, where builders land first) confirmed the gap: its "Server Response Format" section shows only the successresultshape and never mentions theerrorfield, its trigger semantics, or the always-return-HTTP-200 rule.errorfield already exists and is documented on/tools/custom-tools-troubleshootingand referenced on/tools/api-request-vs-function, but a builder implementing their first Function tool from the primary guide would never see it there -- this is a discoverability/incompleteness gap, not a missing feature.What changed
Edited the existing "Server Response Format: Providing Results and Context" section on
fern/tools/custom-tools.mdxonly:errorfield as the failure counterpart toresult, and clarifies that Vapi selects theRequest Failedmessage based on the presence oferror, not by inspectingresult's content./tools/custom-tools-troubleshootingfor other response-format failure modes) and a note on mixingresult/erroracross multiple tool calls in one response.What this does NOT touch
toolCallList/functionnesting). This PR does not re-touch that section -- confirmed by reading that commit's diff before drafting.Evidence
org_id=7c8156fb-e5bb-4f19-be0d-aaf5703c8adc, sources: Zendesk/Plain support tickets, Discord, Fern Ask AI conversations, Posthog NPS, trailing 7/28-day windows ending 2026-09-28.Opened automatically by the Vapi Help Center Update automation.