Skip to main content
Glama

get_conversation

Retrieve complete conversation content by ID from indexed AI chat histories. Use after searching to access specific dialogue details.

Instructions

    Get the full content of a specific conversation by ID.
    Use search_conversations() first to find conversation IDs.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_conversation tool implementation, which retrieves messages for a specific conversation ID from the database.
    @mcp.tool()
    def get_conversation(conversation_id: str) -> str:
        """
        Get the full content of a specific conversation by ID.
        Use search_conversations() first to find conversation IDs.
        """
        con = get_conversations()
        messages = con.execute("""
            SELECT role, content, msg_timestamp
            FROM conversations
            WHERE conversation_id = ?
            ORDER BY msg_index ASC
        """, [conversation_id]).fetchall()
    
        if not messages:
            return f"Conversation not found: {conversation_id}"
    
        output = [f"## Conversation ({len(messages)} messages)\n"]
        for role, content, ts in messages[:20]:
            output.append(f"### {role.upper()} [{ts}]")
            output.append(str(content)[:1000] if content else "(empty)")
            if content and len(str(content)) > 1000:
                output.append(f"_... ({len(str(content))} chars total)_")
            output.append("")
    
        if len(messages) > 20:
            output.append(f"_... {len(messages) - 20} more messages_")
    
        return "\n".join(output)
  • The registration function where MCP tools (including get_conversation) are registered.
    def register(mcp):
        """Register conversation tools with the MCP server."""
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'full content,' which implies a read operation, but doesn't specify details like whether it's idempotent, if there are rate limits, authentication requirements, or error handling. For a tool with no annotations, this leaves significant behavioral gaps.

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 highly concise and well-structured: two sentences that directly state the purpose and usage guideline without any fluff. Every sentence earns its place, and it's front-loaded with the core functionality.

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 the tool's low complexity (1 parameter, no nested objects) and the presence of an output schema (which handles return values), the description is mostly complete. It covers the purpose and basic usage, but lacks behavioral details like error cases or performance hints, which are minor gaps in this context.

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 description adds some meaning beyond the input schema: it clarifies that 'conversation_id' is used to get 'full content,' and mentions using 'search_conversations()' to find IDs. However, with 0% schema description coverage and only 1 parameter, the baseline is 4 for 0 parameters, but here the description compensates minimally. It doesn't explain the ID format or constraints, so it's adequate but not comprehensive.

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 tool's purpose: 'Get the full content of a specific conversation by ID.' It specifies the verb ('Get'), resource ('full content of a specific conversation'), and identifier ('by ID'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'search_conversations' beyond mentioning it as a prerequisite, which keeps it from 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 Guidelines4/5

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

The description provides clear usage guidance: 'Use search_conversations() first to find conversation IDs.' This explicitly tells when to use this tool (after finding IDs) and references an alternative tool for that purpose. However, it doesn't specify when NOT to use this tool or compare it to other siblings like 'conversations_by_date,' which could be relevant for date-based retrieval.

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/mordechaipotash/brain-mcp'

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