Skip to main content
Glama

search_in_context

Search within a specific session to find discussions or events with surrounding conversation context, returning matches plus adjacent timeline events for full conversation flow.

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 key behavioral traits: returns matches with surrounding context (N events before/after), efficiency compared to manual pagination, and semantic matching. However, it lacks details on permissions, rate limits, error handling, or output format, which are important for a search tool with no annotations.

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 front-loaded with the core purpose in the first sentence, followed by usage guidance and efficiency comparison. Every sentence adds value: the second clarifies when to use it, the third explains the return format, and the fourth contrasts with alternatives. No wasted 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 no annotations and no output schema, the description does well by explaining the tool's behavior, usage context, and efficiency. However, it lacks details on output format (e.g., structure of returned matches) and error cases, which are important for a tool with 6 parameters and no structured output documentation.

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 the schema already documents all parameters. The description adds minimal value beyond the schema: it implies 'session_id' and 'query' are required (though the schema states this) and hints at 'context_events' functionality. No additional syntax or format details are provided, so the baseline 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 tool's purpose: 'Search within a specific session and return matches WITH surrounding conversation context.' It specifies the verb ('search'), resource ('session'), and scope ('with surrounding context'), and distinguishes it from sibling tools like 'search' (general) and 'get_session_timeline' (manual pagination).

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?

The description explicitly states when to use this tool: 'when you know WHICH session to look in but need to FIND a specific discussion or event.' It also provides clear alternatives: 'Much more efficient than paginating get_session_timeline manually,' naming a specific sibling tool and explaining why this tool is preferable in this context.

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