Commit bce4403
docs(learnings): add 1000-char limit on function.description across tool types
Vapi enforces a hard 1000-character maximum on function.description for all
tool types (function, apiRequest, transferCall, endCall, dtmf, voicemail,
handoff, code). Over-limit tools don't fail at push time — they ship to the
dashboard but the LLM degrades silently: tools stop being invoked at the
right moment, the LLM picks shorter-description alternatives whose envelope
fits the output budget, and platform-fired tool types (voicemail, dtmf) lose
trigger-detection signal.
Documents the diagnostic signal ("if a tool with a long, detailed description
is being mis-fired, measure description length first"), an audit one-liner,
and content guidance: drop strategy sections that duplicate the assistant
prompt, drop long phrase lists for platform-fired tools (Vapi runs detection
independently), drop anti-TTS-leakage META preambles (tool descriptions never
reach TTS).
Bonus: documents the function.name regex constraint (^[A-Za-z0-9_-]+$).
Surfaced from a real Mudflap incident: end-on-voicemail at 1919 chars,
dtmf at 1747 chars, and end-call-vapi-testing at 1100 chars were all
silently over the limit; classifier symptoms (DTMF firing on humans,
handoff not firing) compounded the over-limit signal degradation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9cf6f64 commit bce4403
1 file changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
7 | 44 | | |
8 | 45 | | |
9 | 46 | | |
| |||
0 commit comments