Skip to main content
Glama
S2thend

cursor-history-mcp

by S2thend

cursor_history_search

Search all Cursor AI chat sessions for a keyword or phrase. Retrieve matching sessions with surrounding context to locate past discussions.

Instructions

Search across all Cursor AI chat sessions for a keyword or phrase. Returns matching sessions with context around each match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10)
queryYesThe search query (keyword or phrase to find)
contextNoNumber of source lines of context requested around each match (default: 50)
workspaceNoWorkspace path. Reuse the same scope for listing and reading a session index.
includeCrossWorkspaceSourcesNoOpt in to complementary sources outside this workspace, only for already selected session IDs. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.1
    • changedInput schema / properties / context / description
      Previous value: -"Number of characters of context to show around each match (default: 50)"New value: +"Number of source lines of context requested around each match (default: 50)"
    • addedInput schema / properties / includeCrossWorkspaceSources
      Added value: +{
      +  "default": false,
      +  "description": "Opt in to complementary sources outside this workspace, only for already selected session IDs. Default: false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "Workspace path. Reuse the same scope for listing and reading a session index.",
      +  "type": "string"
      +}
  2. First observedv0.2.4

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the read-only search behavior and return shape, but it doesn't clarify scope limitations such as workspace vs all sessions, ordering, pagination, or the cross-workspace opt-in behavior.

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 with no filler: the first front-loads the action and scope, the second states the return value. Every sentence earns its place and nothing repeats the schema.

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

Completeness2/5

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

With no output schema and no annotations, the description must explain what the caller receives and how scope is controlled. It gives only a high-level return statement and leaves the workspace-vs-all ambiguity and cross-workspace behavior unaddressed, so an agent may not invoke it correctly in scoped contexts.

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?

All five parameters have schema descriptions (100% coverage), so the baseline is 3. The prose only paraphrases 'keyword or phrase' for query and 'context around each match' for context, adding no genuinely new semantic detail.

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 uses a specific verb ('Search'), names the resource ('all Cursor AI chat sessions'), and states the output ('Returns matching sessions with context around each match'). This clearly distinguishes it from the sibling list/show/export/backup tools.

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?

The description implies the search use case: finding sessions by keyword or phrase. However, it gives no explicit guidance about when to prefer this tool over cursor_history_list or cursor_history_show, and no exclusions or conditions are stated.

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