/** * Formatters to convert API responses to markdown tables * Reduces token usage compared to JSON output */ import type { CallDetails, CallDetailsResponse, CallsResponse, CallTranscript, LibraryFolderCallsResponse, LibraryFoldersResponse, SearchTranscriptsResult, SingleCallResponse, SingleUserResponse, TrackersSettingsResponse, UsersResponse, WorkspacesResponse } from './schemas.js'; interface Party { id?: string | null; name?: string | null; emailAddress?: string | null; speakerId?: string | null; affiliation?: string | null; } /** * Format calls list as markdown table */ export declare function formatCallsResponse(response: CallsResponse): string; /** * Maximum length of the formatted search_calls output before falling back * to compact table format. Matches CircleCI's MCP convention. */ export declare const MAX_OUTPUT_LENGTH: number; /** * Format call details response with adaptive output. * Uses rich per-call blocks when content data is present, * falls back to a compact table for metadata-only results. * * If the rich output would exceed MAX_OUTPUT_LENGTH (default 50000, * configurable via MAX_MCP_OUTPUT_LENGTH env var), automatically * downgrades to the compact table with a warning so the LLM caller * sees IDs and titles and can drill into specific calls. * * trackerFilter, when provided, limits the Trackers line to only * trackers whose name matches one of the supplied needles * (case-insensitive substring). Without a filter, all non-zero * trackers are shown. */ export declare function formatCallDetailsResponse(response: CallDetailsResponse, totalBeforeFilter?: number, trackerFilter?: string[]): string; /** * Format a single call summary (compact, key info only) */ export declare function formatCallSummary(call: CallDetails): string; /** * Options for formatting transcripts with truncation */ export interface FormatTranscriptOptions { maxLength?: number; offset?: number; } /** * Format a single call transcript with speaker names * Supports truncation via maxLength/offset to prevent context overflow */ export declare function formatCallTranscript(transcript: CallTranscript, parties?: Party[] | null, options?: FormatTranscriptOptions): string; /** * Format users list as markdown table */ export declare function formatUsersResponse(response: UsersResponse): string; /** * Format a single call's metadata (GET /v2/calls/{id}) */ export declare function formatSingleCall(response: SingleCallResponse): string; /** * Format a single user's profile (GET /v2/users/{id}) */ export declare function formatSingleUser(response: SingleUserResponse): string; /** * Format keyword trackers response */ export declare function formatTrackersResponse(response: TrackersSettingsResponse): string; /** * Format workspaces list response */ export declare function formatWorkspacesResponse(response: WorkspacesResponse): string; /** * Format library folders list response */ export declare function formatLibraryFoldersResponse(response: LibraryFoldersResponse): string; /** * Format library folder calls response */ export declare function formatLibraryFolderCallsResponse(response: LibraryFolderCallsResponse): string; /** * Format a CallDetails list (with parties and CRM context) for the * search_calls_by_account / search_calls_by_opportunity tools. * * Shows each match with the matching parties highlighted so the agent can * see why the call matched without re-fetching. */ export declare function formatMatchedCalls(calls: CallDetails[], meta: { header: string; totalScanned: number; matched: number; limitedByMaxCalls: boolean; }): string; /** * Format keyword match results from search_transcripts. */ export declare function formatTranscriptMatches(result: SearchTranscriptsResult): string; export {};