Skip to main content
Glama
gcorroto

Asterisk S2S MCP Server

by gcorroto

phone_get_conversation_history

Retrieve recent call conversation history from the Asterisk S2S MCP Server, specifying the number of conversations to fetch for efficient review and analysis.

Instructions

Obtener el historial de conversaciones telefónicas recientes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNúmero máximo de conversaciones a obtener

Implementation Reference

  • Core implementation of getConversationHistory that returns the most recent conversation processing results from the global conversationHistory array.
    export function getConversationHistory(limit: number = 50): ConversationProcessingResult[] {
      return conversationHistory
        .slice(-limit)
        .reverse();
    }
  • Intermediate wrapper function getConversationHistory in tools layer that calls the operations implementation.
    export async function getConversationHistory(args?: {
      limit?: number;
    }): Promise<Array<{
      callId: string;
      success: boolean;
      processed: boolean;
      response_for_user: string;
      actions_taken?: string[];
      errors?: string[];
    }>> {
      const limit = args?.limit || 20;
      return phoneOps.getConversationHistory(limit);
    }
  • index.ts:115-141 (registration)
    MCP tool registration for 'phone_get_conversation_history' including input schema, handler logic that formats and returns conversation history.
    server.tool(
      "phone_get_conversation_history",
      "Obtener el historial de conversaciones telefónicas recientes",
      {
        limit: z.number().optional().default(10).describe("Número máximo de conversaciones a obtener")
      },
      async (args) => {
        const result = await phoneTools.getConversationHistory({ limit: args.limit });
    
        if (result.length === 0) {
          return {
            content: [{ type: "text", text: "📭 No hay conversaciones en el historial" }],
          };
        }
    
        const historyText = result.map(conv => 
          `**${conv.callId}** - ${conv.success ? '✅' : '❌'}\n${conv.response_for_user}\n---`
        ).join('\n\n');
    
        return {
          content: [{ 
            type: "text", 
            text: `📚 **Historial de Conversaciones (${result.length} últimas)**\n\n${historyText}`
          }],
        };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('obtener') but doesn't describe what 'recientes' means (e.g., time frame), whether this is a read-only operation, potential rate limits, authentication needs, or the format of returned data. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence in Spanish that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word contributing to understanding.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'recientes' entails, the structure of returned conversation history, or how this tool differs from siblings. For a tool that retrieves data with potential complexity in scope and format, more context is needed.

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?

The schema description coverage is 100%, with the single parameter 'limit' fully documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

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 verb ('obtener' - get) and resource ('historial de conversaciones telefónicas recientes' - recent phone conversation history), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'phone_get_logs' or 'phone_get_active_calls', which might also retrieve conversation-related data, preventing a perfect score.

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 'phone_get_logs' or 'phone_get_active_calls'. It doesn't mention prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the name alone.

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

Related 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/gcorroto/mcp-s2s-asterisk'

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