Skip to main content
Glama

code_search

Search code by natural-language intent when symbol names are unknown, using deterministic token matching for precise file-level results.

Instructions

NL intent search when symbol name unknown (known name? symbol_search). DETERMINISTIC token+intent matching, NOT semantic/embedding search — long natural-language sentences degrade to loose file-level hits (0.5); prefer precise symbol/file names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 30)
queryYesNL/symbol
workspace_dirYesREQUIRED: project root (abs). reindex first if new.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.4.5-post9
    • addedInput schema / properties / limit / description
      "Max results (default 30)"
    • addedInput schema / properties / workspace_dir / description
      "REQUIRED: project root (abs). reindex first if new."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Without annotations, the description carries the full burden. It clearly discloses that matching is 'DETERMINISTIC token+intent matching, NOT semantic/embedding search' and warns that long sentences degrade to loose file-level hits. This is useful behavioral context. It does not explicitly state read-only behavior, but that is implied by a search tool.

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 two sentences long, front-loaded with the core purpose, and every clause adds value—from distinguishing symbol_search to explaining the deterministic algorithm and its failure mode. This is economy of prose.

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?

Despite no output schema, the description covers the essential context: when to use the tool, how it behaves (deterministic token matching), its limitations (degraded NL queries), and a preferred alternative. For a search tool with these specifics, this is complete and well-rounded.

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 coverage is 100%, so baseline is 3. The description adds context for the query parameter ('NL intent search' and the warning about long sentences), but does not significantly enhance the schema definitions for limit or workspace_dir. It provides some extra meaning for query but is not essential to understand the required parameters.

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 explicitly states 'NL intent search when symbol name unknown', providing a specific verb ('search') and resource ('symbols'). It also distinguishes from the sibling tool 'symbol_search' by noting the known-name alternative, making the tool's purpose unambiguous.

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?

It gives explicit when-to-use guidance: use when symbol name is unknown, and points to symbol_search as the alternative for known names. It also advises preferring precise symbol/file names over long natural-language queries, which is actionable usage direction.

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

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/wulun811/LiuHe'

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