Skip to main content
Glama

search

Find code by meaning when you don't know the exact name to grep for. Use natural-language queries to locate files ranked by semantic similarity.

Instructions

Find code by meaning when you don't know the exact name to grep for.

Use this first for concept-level questions — "where is rate limiting handled", "what validates the config", "code that retries failed requests" — where you have intent but not a literal string or symbol. Once you know the exact token, grep is the faster, exact follow-up.

Ranks cached files by semantic similarity to the query. Operates on files already seeded via read/batch_read; if results look thin, seed more of the repo with batch_read and retry.

Args: query: Natural-language query, keywords, or a mixture of both. k: Maximum number of matches to return. directory: Optional directory filter applied after retrieval. show_preview: Include match previews explicitly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
kNo
directoryNo
show_previewNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNo
queryNo
matchesNo
countNo
cached_filesNo
files_searchedNo
kNo
directoryNo
show_previewNo
Behavior4/5

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

Without annotations, description carries burden. It explains ranking by semantic similarity and dependence on cached files. Does not mention side effects or state changes, but implies read-only. Good but not perfect.

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?

Front-loaded with purpose, then usage, then parameters. Every sentence adds value, no redundancy.

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?

Covers purpose, usage, parameters, and behavior. Output schema exists so return values are covered. Could mention more about the match format, but not necessary.

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 has 0% coverage, but description provides meaningful explanations for each parameter in Args block, adding context beyond types and defaults.

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?

Clearly states 'Find code by meaning when you don't know the exact name to grep for', with specific examples of concept-level questions. Distinguishes from grep sibling.

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 advises to use first for concept-level, then follow up with grep for exact tokens. Also mentions seeding via read/batch_read if results are thin.

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/CoderDayton/semantic-cache-mcp'

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