Skip to main content
Glama

search_in_context

Find specific discussions within a known session by searching with natural language queries and returning each match with surrounding context events from the timeline, enabling reading of full conversation flow without manual pagination.

Instructions

Search within a specific session and return matches WITH surrounding conversation context. This is the tool you want when you know WHICH session to look in but need to FIND a specific discussion or event. Returns each semantic match plus N events before/after it from the timeline, so you can read the full conversation flow. Much more efficient than paginating get_session_timeline manually.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID (prefix match)
queryYesNatural language query to find within the session
context_eventsNoNumber of events to include before AND after each match (default 5)
limitNoMax number of matches to return with context (default 3)
event_typeNoOptional: filter matches to a single event type
max_charsNoMax total output characters (default 20000)
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 discloses that the tool returns 'semantic match plus N events before/after' and that it is more efficient than manual pagination. However, it does not explicitly state that it is read-only, mention any side effects, or discuss error 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?

The description is three sentences, each serving a clear purpose: first states the action and key feature, second clarifies the use case, third explains the return format and efficiency. No extraneous words.

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?

Given the 6 parameters and no output schema, the description explains the key return format (matches with context events) and efficiency. It omits details like error behavior and exact output structure, but is sufficient for an agent to understand the tool's primary function.

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 each parameter is already described. The tool description adds minimal new meaning beyond what the schema provides (e.g., it repeats the default for context_events but doesn't clarify usage of other parameters like max_chars or event_type). Baseline of 3 is appropriate.

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 the verb 'Search within a specific session' and the resource (session). It distinguishes from siblings by highlighting 'WITH surrounding conversation context' and explicitly comparing to get_session_timeline. The phrase 'when you know WHICH session to look in' further differentiates from general search.

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

Usage Guidelines4/5

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

The description gives explicit when-to-use guidance: 'when you know WHICH session to look in but need to FIND a specific discussion or event.' It also compares favorably to paginating get_session_timeline. However, it doesn't explicitly state when not to use or list all alternative siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Wynelson94/longhand'

If you have feedback or need assistance with the MCP directory API, please join our Discord server