Skip to main content
Glama

Get conversation context

get_conversation_context
Read-onlyIdempotent

Returns one conversation already assembled, newest first, so a smaller model can answer about that conversation. It reads messages and call summaries on that conversation id. It does not rewrite them. The most recent messages that fit token_budget are included, plus call summaries for calls on that same conversation. A call uses its stored summary, or a transcript excerpt when no summary is stored. token_budget defaults to 2000. approx_tokens estimates tokens as characters divided by 4, rounded up, on each serialized item. That figure is an estimate, not a tokenizer count. Pass query to also include older messages in this conversation that match it, still inside the budget. since is an ISO 8601 lower bound. Each item has type message or call, its message id or call_id, a timestamp, sender or direction, and text. The result reports approx_tokens, items_included, items_omitted, has_more_older, and server_ms. It returns the items that fit, not the whole conversation. Verification codes and other labeled secrets are masked. Set include_memory true to add the saved memory for this conversation when that account has it turned on. Memory cites message ids and call ids, and reports its version, freshness, and token count. If memory is off, missing, stale, or paused, the result is the source messages and memory.status says why. That does not fail the call, and it does not show a conversation this seat cannot already read.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "conversation_id": "<conversation_id>"
    },
    "name": "get_conversation_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoAlso include older messages in this conversation that contain this text.
sinceNoISO 8601 lower bound. Older items are left out.
token_budgetNoApproximate token cap. Default 2000. Counted as characters divided by 4, rounded up.
include_memoryNoWhen true, add this conversation's saved memory if the account has it turned on. Otherwise the result is the source messages.
conversation_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include_memory / description
      Previous value: -"Reserved. Sending this is rejected until compact conversation memory is available."New value: +"When true, add this conversation's saved memory if the account has it turned on. Otherwise the result is the source messages."
  2. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only establish read-only, idempotent, non-destructive and closed-world. The description goes well beyond: newest-first ordering, what the budget excludes, secret/code masking, that memory being off/missing/stale/paused does not fail the call and instead surfaces memory.status, and that it never exposes a conversation the seat cannot already read. That is genuine behavioral context an agent could not get from the annotations.

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

Conciseness4/5

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

Strongly front-loaded — the first sentence states the resource, ordering, and consumer. Almost every sentence carries new information, but there is minor redundancy: the token-estimate caveat is stated twice ('That figure is an estimate, not a tokenizer count') and the memory fallback is restated in two consecutive sentences.

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

Completeness5/5

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

There is no output schema, so the description must carry the return shape, and it does: the per-item fields (type, message id or call_id, timestamp, sender or direction, text) and the result envelope (approx_tokens, items_included, items_omitted, has_more_older, server_ms, memory.status/version/freshness). For a budgeted, filtered read with a degraded memory path, nothing material is missing.

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

Parameters4/5

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

Schema coverage is 80%, so the baseline is 3. The description still adds meaning: token_budget defaults to 2000 and is approximated as characters/4 rounded up on each serialized item (explicitly 'not a tokenizer count'), query pulls *older* messages inside the same budget, since is a lower bound, and include_memory's degraded-mode behavior is spelled out. The only gap is conversation_id, which is undocumented in both places, though its meaning is self-evident.

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?

States a concrete verb and resource with scope: it returns one assembled conversation, newest first, built from messages and call summaries on a conversation id, and explicitly notes it 'does not rewrite them.' An agent understands exactly what comes back. It stops short of naming the sibling it replaces (e.g. get_thread or get_transcript) for the same underlying data, so the differentiation is implicit.

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

Usage Guidelines3/5

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

The opening clause 'so a smaller model can answer about that conversation' implies the use case (feeding a low-context model a budgeted bundle), and the note that a result is 'not the whole conversation' hints at pagination-driven re-calls. There is no explicit when-to-use versus get_thread/get_transcript guidance and no stated exclusions or prerequisites, leaving the agent to infer routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.