Skip to main content
Glama
AgentHistoryMCP
by luo0629

Search Cross-Agent Dialog History

search_history
Read-onlyIdempotent

Search full-text user and assistant dialog turns across AI coding agents to find prior context by keyword, phrase, or code identifier, excluding tool outputs for high signal.

Instructions

Full-text search across pure user/assistant dialog turns (Chinese, English, and camelCase/snake_case code identifiers) across all discovered AI Coding Agents. Tool outputs are excluded for high signal-to-noise ratio.

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_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of hits to return (default 20).
queryYesKeywords, Chinese/English phrase, or code identifier to search for.
rolesNoOptional dialog roles filter.
agentsNoOptional agent_ids to search (e.g. ['codex', 'claude']). Defaults to all.
project_pathNoOptional project directory path to restrict search scope.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive semantics, but the description adds genuinely new behavior: matching supports Chinese, English, and camelCase/snake_case identifiers, and tool output blocks are deliberately filtered out. It leaves ranking/ordering and behavior when no agents are discovered unstated, so it is not fully transparent.

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?

Two sentences, front-loaded with the core action and scope, with the second sentence carrying a non-redundant behavioral constraint. No filler or repetition of schema fields.

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

Completeness3/5

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

Parameters are fully documented via schema and the safety profile via annotations, but with no output schema the description never indicates what a hit contains (snippet, session id, timestamp, ordering). For a search tool whose result shape matters to an agent's next step, that is a real gap.

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 coverage is 100%, so every parameter (limit, query, roles, agents, project_path) is already documented in the schema, including the agents default of all. The description confirms the query accepts Chinese/English phrases and code identifiers but adds nothing further about roles, limit, or path scoping. Baseline 3 applies.

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: full-text search across pure user/assistant dialog turns from all discovered AI Coding Agents. The added detail about excluded tool outputs and supported scripts/identifiers sharpens the scope. It does not explicitly name siblings like read_session, so the contrast 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 Guidelines3/5

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

Usage is implied rather than stated: the 'tool outputs are excluded' note hints that this is for finding discussion rather than command output, and the agents param implies cross-agent lookup. There is no explicit when-to-use/when-not guidance and no alternative tool is named.

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