Skip to content

docs: enrich dynamic variables table and document function.parameters tool support#1037

Merged
dhruva-reddy merged 1 commit intomainfrom
dr/dynamic-variables-enrich
Apr 29, 2026
Merged

docs: enrich dynamic variables table and document function.parameters tool support#1037
dhruva-reddy merged 1 commit intomainfrom
dr/dynamic-variables-enrich

Conversation

@dhruva-reddy
Copy link
Copy Markdown
Contributor

Description

Two related additions surfaced by an FDE conversation about progressive authentication, where customers asked which Liquid variables are available and which tools support customer-defined function.parameters.

fern/assistants/dynamic-variables.mdx

  • Add 5 new rows to the Default Variables table:
    • {{phoneNumber.number}} — the Vapi number that received/placed the call
    • {{phoneNumber.name}} — display name set on the number
    • {{call.id}} — Vapi-generated call UUID, useful for log correlation
    • {{call.type}}inboundPhoneCall / outboundPhoneCall / webCall
    • {{transport.callSid}} — provider-side CallSid, useful for BYOT customers
  • Tweak the {{now}} row's description to point at Advanced date and time usage below (since {{now}} is hardcoded UTC and the LiquidJS "now" | date: "...", "TZ" form is the only way to get other timezones).
  • Add a callout linking to /tools/static-variables-and-aliases for the trust-tier framing and the within-assistant tool-chaining pattern.

fern/tools/custom-tools.mdx

  • Add a new section "Other tool types that accept custom function parameters" with a matrix showing where customer-defined function.parameters works (function, apiRequest, code, handoff) vs. where the schema is Vapi-controlled or auto-derived (transferCall, endCall, dtmf, voicemail, sms, slack-send-message, GHL/Google integrations, mcp, make, and the Anthropic-native bash/computer/textEditor tools).
  • Cross-link to /tools/static-variables-and-aliases for the static-parameters pattern that pairs with function.parameters.

Judgment calls — variables intentionally NOT exposed

Variable Why skipped
{{phoneNumber.id}}, {{phoneNumber.provider}} Internal IDs / infra fingerprints; no clear customer use case in prompts.
{{call.status}}, {{call.startedAt}}, {{call.assistantId}} Internal state machine fields that are confusing if surfaced in customer prompts mid-call.
{{assistant.id}}, {{assistant.name}} Encourages brittle customer code that hardcodes behavior on assistant identity (rename-fragility).
{{currentDateTime}} Redundant with {{now}}; adds confusion ("which one?") for zero gain.
{{transport.provider}} Internal-infra fingerprint (which transport vendor we use under the hood).

Testing Steps

  • fern check -- 0 errors
  • All internal links resolve (5 links across the two files)
  • No JSON code blocks were modified
  • Verify the new rows render correctly in the Default Variables table on the preview deployment
  • Verify the cross-link callout renders as a Note block
  • Verify the matrix on custom-tools.mdx renders correctly with column wrapping
  • Style guide compliance (active voice, present tense, no marketing language)

Skipped

  • test-writer / code-reviewer (docs-only PR, per write-pr skill skip rules)

Related

… tool support

Two related additions surfaced by an FDE conversation about progressive
authentication, where customers asked which Liquid variables are
available and which tools support customer-defined function.parameters.

fern/assistants/dynamic-variables.mdx:
- Add 5 new rows to the Default Variables table:
  - phoneNumber.number (the Vapi number that received/placed the call)
  - phoneNumber.name (display name set on the number)
  - call.id (Vapi-generated call UUID — useful for log correlation)
  - call.type (inboundPhoneCall / outboundPhoneCall / webCall)
  - transport.callSid (provider-side CallSid, useful for BYOT)
- Tweak the {{now}} description to point at the Advanced date and time
  usage section for non-UTC timezones (the LiquidJS "now" | date filter
  is the only correct pattern; the bag's {{now}} is hardcoded UTC).
- Add a callout linking to /tools/static-variables-and-aliases for the
  trust-tier framing and the within-assistant tool-chaining pattern.

fern/tools/custom-tools.mdx:
- Add a new section 'Other tool types that accept custom function
  parameters' with a matrix showing where customer-defined
  function.parameters works (function, apiRequest, code, handoff) vs.
  where the schema is Vapi-controlled (transferCall, endCall, dtmf,
  voicemail, sms, slack, GHL/Google integrations, mcp, make, and the
  Anthropic-native bash/computer/textEditor tools).
- Includes a follow-on pointer to /tools/static-variables-and-aliases
  for the static-parameters pattern.

Variables intentionally NOT exposed (judgment call):
- phoneNumber.id, phoneNumber.provider — internal IDs / infra
  fingerprints; no clear customer use case in prompts.
- call.status, call.startedAt, call.assistantId — internal state
  that is confusing if surfaced in customer prompts.
- assistant.id, assistant.name — encourages brittle customer code
  that hardcodes behavior on assistant identity.
- currentDateTime — redundant with {{now}}.
- transport.provider — internal-infra fingerprint.
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

@dhruva-reddy dhruva-reddy merged commit da269f6 into main Apr 29, 2026
7 checks passed
@dhruva-reddy dhruva-reddy deleted the dr/dynamic-variables-enrich branch April 29, 2026 21:35
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