Open
Conversation
The existing get_call tool returns a summary projection (id, status, endedReason, assistantId, phoneNumberId, customer.number, scheduledAt) which makes it impossible to fetch transcripts, recordings, messages, costs, or analysis without dropping out to the REST API. This adds a sibling get_call_details tool that returns the full call payload. It accepts an optional 'include' array so callers can scope the response to specific fields (transcript, recordingUrl, messages, costs, cost, analysis, summary, artifact) and keep LLM context windows in check on long calls. - New schemas: GetCallDetailsInputSchema, CallDetailsOutputSchema, CALL_DETAIL_FIELDS - New transformer: transformCallDetailsOutput - New tool registration in src/tools/call.ts - E2E test updated to assert tool is registered
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.
Summary
The existing
get_calltool returns a summary projection (id, status, endedReason, assistantId, phoneNumberId, customer.number, scheduledAt) — there's no way to fetch transcripts, recordings, messages, costs, or analysis through MCP without dropping out to the REST API.This adds a sibling
get_call_detailstool that returns the full call payload. It accepts an optionalincludearray so callers can scope the response to specific fields and keep LLM context windows manageable on long calls.Changes
src/schemas/index.ts:GetCallDetailsInputSchema(callId + optionalinclude)CallDetailsOutputSchema(extendsCallOutputSchema)CALL_DETAIL_FIELDSconstanttransformCallDetailsOutputinsrc/transformers/index.ts— falls back tocall.artifact[field]when the field isn't on the top-level call objectget_call_detailsinsrc/tools/call.ts, paired with the existingget_callTest plan
npm run buildpassestsc --noEmitcleaninclude: ['transcript']returns just{ id, transcript }includereturns the full summary + all detail fields