Skip to main content
Glama

agent.conversation

Display the complete conversation between two agents in chronological order. Automatically marks received messages as read.

Instructions

View the full conversation history with another agent. Shows all messages in both directions, chronologically. Automatically marks received messages as read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_identifierYesYour agent identifier (must be registered).
other_identifierYesThe other agent's identifier.
limitNoMax messages. Default: 50.

Implementation Reference

  • The main handler function for agent.conversation. It validates agent_identifier and other_identifier, looks up both agents, calls getConversation() to retrieve the full conversation history, marks messages as read, and returns the result.
    export async function handleAgentConversation(args: Record<string, unknown>): Promise<ToolResult> {
      const agentIdentifier = (args.agent_identifier as string || "").trim();
      const otherIdentifier = (args.other_identifier as string || "").trim();
    
      if (!agentIdentifier) return { error: "agent_identifier is required" };
      if (!otherIdentifier) return { error: "other_identifier is required" };
    
      const agent = await getAgent(agentIdentifier);
      if (!agent) return { error: "Agent not registered. Call memory.register first." };
    
      const other = await getAgent(otherIdentifier);
      if (!other) return { error: "Other agent not found." };
    
      await updateAgentSeen(agent.id);
      const limit = Math.min((args.limit as number) || 50, 100);
      const messages = await getConversation(agent.id, other.id, limit);
    
      return {
        status: "ok",
        messages,
        count: messages.length,
        note: "Messages from the other agent have been marked as read.",
      };
    }
  • The tool definition and input schema for agent.conversation. Defines required parameters (agent_identifier, other_identifier) and optional limit (max 100, default 50).
    {
      name: "agent.conversation",
      description:
        "View the full conversation history with another agent. " +
        "Shows all messages in both directions, chronologically. " +
        "Automatically marks received messages as read.",
      inputSchema: {
        type: "object",
        properties: {
          agent_identifier: {
            type: "string",
            description: "Your agent identifier (must be registered).",
          },
          other_identifier: {
            type: "string",
            description: "The other agent's identifier.",
          },
          limit: {
            type: "integer",
            minimum: 1,
            maximum: 100,
            description: "Max messages. Default: 50.",
          },
        },
        required: ["agent_identifier", "other_identifier"],
      },
    },
  • src/server.ts:82-85 (registration)
    The switch-case registration in the MCP server's CallToolRequestSchema handler that routes 'agent.conversation' to handleAgentConversation.
    // DMs
    case "agent.message": result = await handleAgentMessage(safeArgs); break;
    case "agent.inbox": result = await handleAgentInbox(safeArgs); break;
    case "agent.conversation": result = await handleAgentConversation(safeArgs); break;
  • src/server.ts:22-24 (registration)
    Import of handleAgentConversation from ./tools/messages.js into the server module.
    import {
      handleAgentMessage, handleAgentInbox, handleAgentConversation,
    } from "./tools/messages.js";
Behavior4/5

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

With no annotations, the description carries full burden. It discloses 'Automatically marks received messages as read', a key side effect beyond viewing. This adds significant transparency, though it could mention if this is reversible.

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 two sentences, front-loading the purpose. Every sentence earns its place with no wasted words.

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

Completeness4/5

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

Given no output schema, the description covers key aspects: purpose, side effect, ordering. Lacks info on return format and pagination, but is sufficient for a simple history view.

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 baseline 3. The description adds context about ordering and side effects but does not add parameter-specific meaning beyond what schema provides.

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

Purpose5/5

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

The description clearly states the tool 'View the full conversation history with another agent', specifying the verb and resource. It distinguishes from siblings like agent.inbox (likely summary) and agent.message (sending) by focusing on full history.

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

Usage Guidelines4/5

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

The description implies usage for viewing complete conversations chronologically, but does not explicitly state when to use alternatives or when not to use it. Offers clear context but lacks exclusions.

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/MastadoonPrime/sylex-memory'

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