Skip to main content
Glama

search_historical_context

Search past AI conversations to recall architectural debates, code examples, and requirements from earlier sessions.

Instructions

Searches historical conversation turns across all local AI clients (Antigravity, Codex, and Claude Code) in sub-3ms using SQLite FTS5.

Call this tool when you need to recall past architectural debates, specific code examples, bash commands, or requirements from earlier sessions.

Args: query: Natural language or keyword search terms (e.g. 'decimal arithmetic', 'wal mode'). limit: Maximum number of matches to return (default: 5). role: Optional filter: 'user' (user requests) or 'assistant' (model outputs). source: Optional client filter: 'antigravity', 'codex', or 'claude_code'.

Returns: str: Formatted list of matches with full provenance citations (Client, Role, Timestamp, Turn ID, and content excerpt).

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": {
      "query": "<query>"
    },
    "name": "search_historical_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNo
limitNo
queryYes
sourceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, this sentence carries the full burden of behavioral disclosure. It says where the data comes from (all local AI clients), the underlying engine (SQLite FTS5), and the performance profile (sub-3ms), which is exactly the kind of detail annotations would otherwise supply. Read-only access and result shape are implied by 'searches' and the Returns block, but permission scoping across clients is never stated.

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?

Front-loaded summary sentence, then a clear when-to-use sentence, then Args and Returns blocks. Every line adds information: engine, latency, triggers, parameter meanings, return format. There is no filler and no restatement of the title.

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?

For a four-parameter read tool with no annotations, the definition covers purpose, invocation triggers, full parameter semantics, and expected return content. An output schema exists, so the brief Returns note is more than enough and an agent has everything it needs in order to call it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must document everything and it does. It covers all four parameters and supplies the meaning the schema lacks: accepted role values ('user'/'assistant'), accepted source values ('antigravity'/'codex'/'claude_code'), the default limit of 5, and example query strings.

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?

Specific verb and resource: 'Searches historical conversation turns across all local AI clients (Antigravity, Codex, and Claude Code)'. It conveys scope, data source, and performance characteristics so the agent knows exactly what is being searched. It does not explicitly contrast itself with the sibling get_recent_context, so the distinction between 'historical' and 'recent' is left implicit.

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?

'Call this tool when you need to recall past architectural debates, specific code examples, bash commands, or requirements from earlier sessions' gives concrete triggering scenarios. It stops short of naming the sibling to use for recent/session-local context or stating when this tool is the wrong choice, which keeps it out of 5 territory.

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