Skip to main content
Glama

search_in_context

Find specific discussions within a known session and return matches with surrounding conversation context to understand the full 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)
Behavior4/5

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

No annotations provided, but description details return structure—each match plus N events before/after—and default parameter values, adding behavioral context beyond 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise paragraph where each sentence adds value: purpose, usage context, return detail, efficiency comparison.

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

Completeness5/5

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

For a search tool with 6 parameters and no output schema, description adequately explains what it returns and how to use it, including defaults and optional filters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Description explains the meaning of key parameters like context_events (before AND after each match), limit (max matches), and max_chars (total output), enhancing the schema descriptions.

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 searches within a specific session and returns matches with surrounding context, distinguishing it from siblings like 'search' and 'get_session_timeline'.

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?

Explicitly says when to use: when you know which session to look in but need to find a specific discussion, and it's more efficient than paginating get_session_timeline.

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