Skip to main content
Glama

Search prompt history

search_history

Search past user prompts by keyword to retrieve timestamped snippets, optionally filtered by session and result limit.

Instructions

Search past user prompts (kind='prompt') by keyword. Returns timestamped snippets truncated to 200 chars each.

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
limitNoMax results (default 10)
queryYesText to search in past prompts
sessionIdNoFilter by captured session id (default: all sessions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changedv2.4.0
    • addedInput schema / properties / sessionId
      Added value: +{
      +  "description": "Filter by captured session id (default: all sessions)",
      +  "maxLength": 200,
      +  "type": "string"
      +}
  3. First observedv2.2.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden alone; it does disclose two useful behaviors: snippets are truncated to 200 chars and results are timestamped. It does not state permission requirements, whether search is case-insensitive or substring vs. semantic, or what happens when nothing matches.

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 short sentences, front-loaded with the core action and searchable scope, followed by the return-value note. No filler or redundancy.

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 three-parameter read tool with full schema coverage and no output schema, the description supplies the essentials: what is searched, how results are scoped, and the return snippet format. Minor gaps remain around result ordering and empty-result behavior, which matter lightly for a search tool.

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 100%, so baseline is 3, but the description adds meaning by naming the searchable field (prompts of kind='prompt') and reinforcing that it is keyword-based, which clarifies query semantics not stated in the schema. It does not elaborate on limit or sessionId beyond the schema.

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 (search) and resource (past user prompts, kind='prompt') and discloses the return shape (timestamped snippets truncated to 200 chars). It is clearly distinct from siblings like recall or get_recent_interactions, though it doesn't explicitly name an alternative to distinguish itself.

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 by the name and by the keyword-search framing, but there is no explicit statement of when to prefer this over recall or get_recent_interactions, nor any exclusion of other memory kinds beyond the parenthetical kind='prompt'.

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