Skip to main content
Glama

search_history

Retrieve exact historical session events when current context lacks detail, including past commands, errors, file changes, and test results. Use this to find missing information from previous sessions.

Instructions

Search exact historical session events when current context does not contain enough detail. Use for questions about previous commands, errors, file changes, test results, bugs, user-provided information, or historical actions. Returns raw events from past sessions. Call this when get_context() and search_memory() do not contain the needed information. Different from search_memory which searches curated long-term knowledge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results to return
queryYesSearch term (case-insensitive)
event_typesNoOptional: filter by event types (command, error, file_modified, etc.)
session_idsNoOptional: filter to specific sessions
workspace_pathNoOptional: filter to specific project

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of transparency. It discloses that this tool returns raw events from past sessions and searches historical events rather than curated knowledge. It does not state side effects or permissions, but as a read-only search operation, the behavioral profile is reasonably clear. Minor gaps include no mention of result ordering or default behavior, but the core behavior is clear.

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?

The description is appropriately sized and front-loaded, starting with the action and scope, then use cases, fallback conditions, and sibling distinction. Slight redundancy exists between 'when current context does not contain enough detail' and 'Call this when get_context() and search_memory() do not contain the needed information,' but every sentence earns its place.

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 read-only search tool with 100% schema coverage and no output schema, the description provides enough context: what it searches, what it returns, when to use it, and how it relates to sibling tools. It does not describe the shape of returned raw events, but the absence of an output schema makes that a minor but acceptable 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 description coverage is 100%, so the schema already documents all five parameters. The description adds use-case context but no additional parameter-level detail beyond what the schema already provides. This meets the baseline for full schema coverage without needing compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Search'), a specific resource ('historical session events'), and the exact scope ('exact historical... raw events from past sessions'). It also distinguishes itself from search_memory by noting the difference between raw historical events and curated long-term knowledge.

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

Usage Guidelines5/5

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

The description gives explicit conditions for use: when current context lacks detail and when get_context() and search_memory() are insufficient. It explicitly names the alternative tools and clarifies how search_history differs from search_memory, giving an agent clear routing guidance.

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