Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Search past conversation history

search_conversation_history
Read-onlyIdempotent

Search the user's full conversation history via Postgres full-text search.

CALL search_conversation_history when the user refers to specific past messages, errors, decisions, or details that you do not already see in the live context window. Examples of when to call:

  • "What was that error I got on Tuesday?"

  • "What did we decide about stop losses last week?"

  • "Can you check what I said about the Alpaca key?"

  • When the user asks about something specific that was discussed days or weeks ago.

Rules:

  • Results are already scoped to the authenticated user (you cannot search other users' messages).

  • Results are truncated and capped. Do NOT ask for limit=20 unless the default 5 returned nothing relevant.

  • Messages containing secret-shaped strings (API keys, tokens, passwords) are silently dropped from results. If the user mentions a secret, tell them you cannot surface it from history.

  • This is FACTUAL recall. For user preferences or durable facts, use search_memory instead.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax messages to return. Defaults to the server-configured maximum (currently 5). Hard ceiling is 20.
queryYesNatural-language keyword search over the user's full message history. Examples: "alpha picks API key error", "TSLA bracket order rejection", "what did we decide about stop losses". The query is passed through Postgres websearch_to_tsquery so plain English works (no boolean operators required).
conversationIdNoOptional: limit search to a single conversation id. Omit to search across ALL of the user's conversations, which is the usual case.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: results are scoped to the authenticated user, output is truncated and capped, secret-shaped strings are silently dropped (a genuine surprise an agent must warn the user about), and the default result count is 5. These are behavioral facts an agent could not infer from structured fields.

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?

Well front-loaded: purpose sentence first, then a when-to-call block with examples, then hard rules. Every section is scannable and earns its place, though the example set is slightly longer than strictly needed given the schema already carries example queries.

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?

With no output schema, the description carries the burden of describing returns, and it does the important parts: capped/truncated results and silent removal of secret-shaped messages. It does not state what fields a returned message contains (role, timestamp, conversation id), a minor remaining gap for a three-parameter 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 the schema already documents query, limit, and conversationId, making 3 the baseline. The description adds operational meaning on top: it warns not to request limit=20 unless the default 5 returned nothing, and reinforces that omitting conversationId searches all conversations, which is the usual case.

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 names a specific verb and resource ('Search the user's full conversation history') and states the mechanism ('via Postgres full-text search'). It explicitly distinguishes itself from the closest sibling, search_memory, by framing itself as FACTUAL recall versus preference/durable-fact recall, so an agent can route without opening either schema.

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?

It gives an explicit trigger condition ('when the user refers to specific past messages, errors, decisions, or details that you do not already see in the live context window') backed by three concrete example queries. It also names the alternative (search_memory) and the exact condition that selects it, which is the strongest form of routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.