Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Search past conversation history

search_conversation_history
Read-only

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.

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 only declare readOnlyHint=true, but the description adds substantial non-obvious behavior: results are auto-scoped to the authenticated user, results are truncated and capped, and messages containing secret-shaped strings are silently dropped with a prescribed user-facing response. These are exactly the traits an agent could not infer from the schema.

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?

Front-loaded with purpose, then call conditions, then a Rules block — a clean, scannable structure. The three quoted example queries are useful for trigger matching but add length; nearly every sentence still 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?

With no output schema, the description covers return characteristics (truncated, capped, secrets filtered) and the retry policy, which is what an agent most needs. It stops short of describing the shape of a returned message (content, timestamp, conversation id), a minor gap 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 real semantic guidance for `limit` ('do NOT ask for limit=20 unless the default 5 returned nothing relevant'), which encodes a retry/escalation policy the schema's min/max cannot express. It does not discuss conversationId, though the schema already explains it well.

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?

States a specific verb and resource ('search the user's full conversation history') plus the underlying mechanism (Postgres full-text search). It also explicitly distinguishes itself from the closest conceptual sibling by declaring this to be FACTUAL recall and routing preference lookups to search_memory.

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?

Gives an explicit trigger condition ('when the user refers to specific past messages, errors, decisions, or details not in the live context window'), three concrete example utterances, and a named alternative (search_memory) for a different intent class. The Rules block further constrains limit escalation behavior.

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.