Skip to content

Conversation

@vapi-tasker
Copy link

@vapi-tasker vapi-tasker bot commented Jan 27, 2026

Summary

  • Fixed get_call tool to return the complete Vapi API response instead of filtering fields
  • The messages array (containing the full transcript with role, content, timestamps) is now included
  • Additional useful fields are now accessible: transcript, recordingUrl, stereoRecordingUrl, cost, costBreakdown, analysis, artifact, and more

Problem

The get_call MCP tool was only returning a subset of fields:

  • id, createdAt, updatedAt, status, endedReason, assistantId, phoneNumberId, customer, scheduledAt

The Vapi REST API at GET /call/{id} returns the complete call object including the messages array (transcript), but the MCP wrapper's transformCallOutput function was stripping this data.

Solution

Updated transformCallOutput in /src/transformers/index.ts to spread the entire call object instead of selecting specific fields. The CallOutputSchema in /src/schemas/index.ts has been updated to document the newly exposed fields while using Zod's passthrough() to allow any additional fields from the API.

Changes

File Description
src/transformers/index.ts Modified transformCallOutput to pass through full API response
src/schemas/index.ts Updated CallOutputSchema with message, transcript, recording, and cost fields
src/__tests__/transformers.test.ts Added unit tests for the transformer fix

Test plan

  • Added unit tests that verify messages, transcript, recordingUrl, cost, and costBreakdown are included in the output
  • Tests verify backward compatibility (existing fields still work)
  • Tests verify graceful handling of calls without messages
  • TypeScript compilation passes
  • Build succeeds

Linear Issue

Fixes: PRISM-5


Generated with Claude Code

…ript

The get_call tool was only returning a subset of fields from the Vapi API.
This change updates transformCallOutput to pass through the complete API
response, including:

- messages (full transcript with role, content, timestamps)
- transcript (plain text transcript)
- recordingUrl and stereoRecordingUrl
- cost and costBreakdown
- analysis and artifact data
- Additional call metadata

The CallOutputSchema has been updated to document these fields while using
passthrough() to allow any additional fields from the API.

Fixes: PRISM-5

Co-Authored-By: Claude <[email protected]>
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.

0 participants