Skip to main content
Glama
huawang1258

semantic-code-mcp

by huawang1258

codebase_search

Search a codebase using natural language queries to find relevant code snippets.

Instructions

语义检索代码库,返回最相关的代码片段。

Args: information_request: 自然语言查询,例如"用户登录鉴权逻辑在哪里" directory_path: 要检索的代码库绝对路径 top_n: 可选,返回结果数(0 = 用默认值 SCM_TOP_N,默认 10) path_filter: 可选,文件路径过滤;含通配符按 glob 匹配(如 "*.java"、"/service/"), 否则按路径子串匹配(如 "controller") include_related: 可选,是否附带 call graph 关联块(调用者/被调用者),默认 True

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNo
path_filterNo
directory_pathYes
include_relatedNo
information_requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It explains parameter behavior but does not mention whether the tool is read-only, whether it modifies state, rate limits, or side effects. For a search tool, it likely performs only reads, but that is not explicitly stated.

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 starts with a concise purpose line, followed by a bulleted list of parameters. Each sentence serves a clear purpose, and there is no redundant information. The structure is efficient and easy to parse.

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

Completeness3/5

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

The tool has an output schema (from context signals) so return values need not be described. However, the description lacks context on prerequisites (e.g., valid directory_path on server), performance implications, or when to use this tool over others. Given moderate complexity, it is minimally complete but has gaps.

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?

With schema description coverage at 0%, the description adds substantial value by explaining each parameter: 'information_request' as natural language query, 'path_filter' with glob matching logic, 'include_related' default, 'top_n' defaulting to SCM_TOP_N. This compensates fully for the lack of 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 '语义检索代码库,返回最相关的代码片段', which is a specific verb-resource combination indicating semantic search of a codebase. Despite no sibling tools, the purpose is unambiguous and well-defined.

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?

No guidance on when to use this tool versus alternatives. With no sibling tools, the description could still indicate scenarios or prerequisites (e.g., requires a local codebase path). The parameter descriptions explain what they do but not when the tool is appropriate.

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/huawang1258/semantic-code-mcp'

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