Skip to main content
Glama

get_recent_context

Retrieve recent conversation turns across local AI clients to restore historical context from prior chat sessions without leaving the MCP workflow.

Instructions

Retrieves recent conversation turns across all local AI clients.

Call this tool when you need ambient historical context from previous chat sessions without leaving the MCP workflow. Reads from the unified SQLite conversation ledger.

Args: limit: Maximum number of chronological turns to return (default: 10). source: Optional client filter: 'antigravity', 'codex', or None (for all clients).

Returns: list[dict[str, Any]]: Chronologically ordered list of turn dictionaries, each containing: - 'id': Deterministic turn ID (e.g., 'antigravity:caa4cbcc:447') - 'source': Originating client ('antigravity', 'codex') - 'session_id': Session or thread identifier - 'role': Message sender ('user', 'assistant') - 'content': Raw turn text - 'timestamp': ISO 8601 creation time

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_recent_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
sourceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the data source (SQLite ledger), chronological ordering, and a default limit, and 'Retrieves' implies a non-mutating read. It says nothing about permission requirements, result-size or latency characteristics when limit is raised, or how 'recent' is bounded, which are the gaps an agent would care about.

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?

Front-loaded with a one-line purpose followed by a usage sentence, then cleanly separated Args and Returns sections. Every block carries information the caller needs. The Returns block duplicates the available output schema, which is mild redundancy rather than waste.

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?

For a two-optional-parameter read tool this covers purpose, trigger, both parameters with allowed values, and return shape. With an output schema present, the return documentation is not strictly required, but nothing an agent needs in order to call it correctly is missing. The only gap is the absence of any behavioral caveats, which matters slightly more because no annotations are provided.

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 0%, so the description must compensate, and it does: 'limit' is defined as the maximum number of chronological turns with its default of 10, and 'source' is defined as an optional client filter. Critically, it enumerates the allowed source values ('antigravity', 'codex', or None), which the schema does not express at all since it types the field as anyOf string/null with no enum. Only minor details like case sensitivity are absent.

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 specific verb and resource: 'Retrieves recent conversation turns across all local AI clients', plus the backing store ('unified SQLite conversation ledger'). Scope ('recent', 'across all local clients') is unambiguous, so an agent knows this is a chronological tail-read rather than a keyword search. It stops short of naming how it differs from the historical-search sibling, which keeps it at 4.

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?

Gives an explicit trigger: 'Call this tool when you need ambient historical context from previous chat sessions without leaving the MCP workflow.' That is a clear use context rather than a vague restatement. There is no when-not guidance or exclusion clause, so it does not reach 5.

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