Skip to main content
Glama
PhononX

Carbon Voice

by PhononX

get_recent_messages

Read-only

Retrieve recent messages with conversation, creator, and label details from Carbon Voice. Filter by conversation ID or language to access up to 10 messages.

Instructions

Get most recent messages, including their associated Conversation, Creator, and Labels information. Returns a maximum of 10 messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idNoConversation ID (optional)
languageNoLanguage (optional) - Original language will be used if not provided or not found.

Implementation Reference

  • src/server.ts:153-181 (registration)
    Registration of the 'get_recent_messages' MCP tool, including its description, input schema reference, annotations, and inline handler function that authenticates and calls the underlying API, formatting the response.
    server.registerTool(
      'get_recent_messages',
      {
        description:
          'Get most recent messages, including their associated Conversation, Creator, and Labels information. ' +
          'Returns a maximum of 10 messages.',
        inputSchema: getTenRecentMessagesResponseQueryParams.shape,
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
        },
      },
      async (
        args: GetTenRecentMessagesResponseParams,
        { authInfo },
      ): Promise<McpToolResponse> => {
        try {
          return formatToMCPToolResponse(
            await simplifiedApi.getTenRecentMessagesResponse(
              args,
              setCarbonVoiceAuthHeader(authInfo?.token),
            ),
          );
        } catch (error) {
          logger.error('Error getting recent messages:', { args, error });
          return formatToMCPToolResponse(error);
        }
      },
    );
  • The handler function for the tool, which executes the logic: calls simplifiedApi.getTenRecentMessagesResponse with parameters and auth token, formats the result using formatToMCPToolResponse, and handles errors.
    async (
      args: GetTenRecentMessagesResponseParams,
      { authInfo },
    ): Promise<McpToolResponse> => {
      try {
        return formatToMCPToolResponse(
          await simplifiedApi.getTenRecentMessagesResponse(
            args,
            setCarbonVoiceAuthHeader(authInfo?.token),
          ),
        );
      } catch (error) {
        logger.error('Error getting recent messages:', { args, error });
        return formatToMCPToolResponse(error);
      }
    },
  • Zod schema definition for the input parameters to the get_recent_messages tool (getTenRecentMessagesResponseQueryParams), used as inputSchema in registration.
    export const getTenRecentMessagesResponseQueryParams = zod.object({
      "conversation_id": zod.string().optional().describe('Conversation ID (optional)'),
      "language": zod.string().optional().describe('Language (optional) - Original language will be used if not provided or not found.')
    })
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows this is a safe read operation. The description adds useful behavioral context: it specifies the maximum return count (10 messages) and indicates what related data is included (Conversation, Creator, Labels). However, it doesn't describe pagination behavior, sorting order, or what 'most recent' means temporally.

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 - just two sentences that efficiently convey the core functionality and key limitation. Every word earns its place: the first sentence explains what the tool does and what data it returns, the second specifies the important constraint. No wasted words or redundant information.

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

Completeness3/5

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

For a read-only tool with good annotations and full schema coverage, the description provides adequate but minimal context. It explains what data is returned and the 10-message limit, but doesn't address important aspects like how 'most recent' is determined, whether results are paginated, or how this tool differs from similar siblings. Without an output schema, more detail about return format would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents both optional parameters (conversation_id and language). The description doesn't add any parameter-specific information beyond what's in the schema. The baseline score of 3 is appropriate when the schema provides complete parameter documentation.

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

Purpose4/5

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

The description clearly states the action ('Get most recent messages') and specifies what information is included ('Conversation, Creator, and Labels information'), which goes beyond just the name. However, it doesn't explicitly differentiate from sibling tools like 'list_messages' or 'get_message', which likely have different scopes or filtering capabilities.

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

Usage Guidelines2/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 like 'list_messages' or 'get_message'. It mentions a maximum return of 10 messages, but doesn't explain when this limitation is appropriate or what scenarios warrant using this tool over others with potentially different pagination or filtering options.

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