Skip to main content
Glama

Search Code

search_code

Search code files by keyword to locate relevant source code, accelerating debugging and error diagnosis.

Instructions

搜索代码文件

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
keywordYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.1/5.0
Behavior1/5

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

With no annotations, the description carries the full burden of behavioral disclosure. 'Search code files' reveals nothing about matching semantics, case sensitivity, regex support, scope, indexing behavior, or result format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

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

The description is very short and front-loaded, but it is under-specified rather than appropriately concise. It sacrifices all useful context for brevity, so it does not earn its place as a helpful tool description.

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

Completeness1/5

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

Given the absence of annotations, the description is far from complete. It lacks usage guidance, behavioral details, parameter explanations, and any information about the output, making it inadequate for correct tool selection and invocation.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain the meaning or usage of 'keyword' or 'limit'. The agent must rely entirely on the schema names, which is insufficient for a search tool with behavioral nuances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('search') and resource ('code files'), so the basic purpose is understandable. However, it does not differentiate this tool from siblings like grep or read_file, which could also be used to search code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use search_code versus alternatives such as grep, search_case, or read_file. No context, prerequisites, or exclusions are provided, leaving the agent to guess which tool fits a given scenario.

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