Skip to main content
Glama

preview

Retrieve the complete contextual excerpt around a search term within a file, including metadata like size and type. Useful for examining full passages from search results.

Instructions

取某个文件在索引里命中查询词的完整上下文(约 1500 字,比 search 返回的摘要长得多),附带文件大小/修改时间/类型。path 用 search 结果里的 path 字段。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes目标文件的完整路径,取自 search 结果里的 path 字段
queryYes定位高亮用的查询词,通常和 search 时用的一致
Behavior3/5

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

With no annotations, the description carries the full burden. It describes a read-only retrieval operation with no mention of side effects, but does not explicitly state idempotency or non-destructiveness. Adequate but could be more explicit.

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?

Two concise sentences that front-load the purpose and then provide supporting details. No superfluous information.

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?

The description covers purpose, parameters, output (context length, metadata), and usage context. Lacks explicit output format details, but for a simple tool with no output schema, it is reasonably complete.

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% with parameter descriptions. The description adds value by explaining that 'path' should come from search results and that 'query' should match the search query, providing practical usage context beyond the schema.

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 retrieves full context of query hits in a file (about 1500 characters), along with file metadata, and explicitly distinguishes it from the sibling 'search' tool which returns a shorter summary.

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 tells users to use the path from search results and that the context is longer than search's summary, providing clear guidance on when to use this tool (after search) and how it differs from sibling tools.

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/ltspace/dowse'

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