Skip to main content
Glama
PhononX

Carbon Voice

by PhononX

summarize_conversation

Generate concise summaries of Carbon Voice conversations to extract key information and insights from message exchanges.

Instructions

Summarize a conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYes
prompt_idYes
message_idsNo
languageNo
start_dateNo
end_dateNo
limitNo

Implementation Reference

  • src/server.ts:487-529 (registration)
    Full registration of the 'summarize_conversation' tool, including the inline anonymous handler function that implements the tool's logic by fetching messages if necessary and calling the AI response API to generate a summary.
    server.registerTool(
      'summarize_conversation',
      {
        description: 'Summarize a conversation.',
        inputSchema: summarizeConversationParams.shape,
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
        },
      },
      async (
        args: SummarizeConversationParams,
        { authInfo },
      ): Promise<McpToolResponse> => {
        try {
          let message_ids: string[] = args.message_ids || [];
    
          // If no message ids are provided, get couple of messages from the conversation
          if (!args.message_ids) {
            const messages = await simplifiedApi.listMessages(
              args,
              setCarbonVoiceAuthHeader(authInfo?.token),
            );
            message_ids = messages.results?.map((message) => message.id) || [];
          }
    
          const aiResponse = await simplifiedApi.aIResponseControllerCreateResponse(
            {
              prompt_id: args.prompt_id,
              message_ids: message_ids,
              channel_id: args.conversation_id,
              language: args.language,
            },
            setCarbonVoiceAuthHeader(authInfo?.token),
          );
    
          return formatToMCPToolResponse(aiResponse);
        } catch (error) {
          logger.error('Error summarizing conversation:', { error });
          return formatToMCPToolResponse(error);
        }
      },
    );
  • The anonymous async handler function that executes the core logic of the summarize_conversation tool: conditionally lists recent messages from the conversation, then invokes the AI response controller with a specific prompt to generate the summary.
    async (
      args: SummarizeConversationParams,
      { authInfo },
    ): Promise<McpToolResponse> => {
      try {
        let message_ids: string[] = args.message_ids || [];
    
        // If no message ids are provided, get couple of messages from the conversation
        if (!args.message_ids) {
          const messages = await simplifiedApi.listMessages(
            args,
            setCarbonVoiceAuthHeader(authInfo?.token),
          );
          message_ids = messages.results?.map((message) => message.id) || [];
        }
    
        const aiResponse = await simplifiedApi.aIResponseControllerCreateResponse(
          {
            prompt_id: args.prompt_id,
            message_ids: message_ids,
            channel_id: args.conversation_id,
            language: args.language,
          },
          setCarbonVoiceAuthHeader(authInfo?.token),
        );
    
        return formatToMCPToolResponse(aiResponse);
      } catch (error) {
        logger.error('Error summarizing conversation:', { error });
        return formatToMCPToolResponse(error);
      }
    },
  • Zod schema defining the input parameters for the summarize_conversation tool, including conversation_id, prompt_id, optional message_ids, language, date ranges, and limit.
    export const summarizeConversationParams = z.object({
      conversation_id: z.string().nonempty(),
      prompt_id: z.string().nonempty(),
      message_ids: z.array(z.string()).optional(),
      language: z.string().optional(),
      start_date: z.string().datetime().optional(),
      end_date: z.string().datetime().optional(),
      limit: z.number().optional().default(50),
    });
  • TypeScript type definition for SummarizeConversationParams, inferred from the Zod schema for type safety in the handler.
    export type SummarizeConversationParams = z.infer<
      typeof summarizeConversationParams
    >;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false and destructiveHint=false, but the description does not add behavioral context beyond this. It fails to explain what 'summarize' entails operationally—such as whether it generates new content, modifies data, or has side effects like rate limits or authentication needs. With annotations covering basic safety, the description adds minimal value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence, 'Summarize a conversation.', which is front-loaded and wastes no words. However, this brevity comes at the cost of informativeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of 7 parameters, 0% schema coverage, no output schema, and annotations providing only basic hints, the description is severely incomplete. It does not address parameter meanings, output format, or behavioral details needed for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 7 parameters are documented in the schema. The description does not mention any parameters, their purposes, or how they affect summarization, leaving the agent with no semantic understanding beyond raw schema structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Summarize a conversation' restates the tool name 'summarize_conversation' almost verbatim, making it tautological. While it indicates the general action (summarize) and resource (conversation), it lacks specificity about what aspects are summarized or how it differs from sibling tools like 'get_conversation' or 'list_conversations'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context for summarization, or any sibling tools that might be relevant, leaving the agent with no usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhononX/cv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server