Skip to main content
Glama

codegraph_search

Find functions, classes, and methods by name with file paths and line numbers. Use instead of grep for symbol definitions, triggering background indexing if not yet indexed.

Instructions

Search for code symbols by name. Returns matching functions, classes, methods, etc. with file paths and line numbers. Use this INSTEAD of grep when looking for function/class/method definitions. If the codebase hasn't been indexed yet, this starts background indexing and asks you to retry in a few seconds — non-blocking, so you can continue working while indexing runs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoFilter by symbol kind (Function, Class, Method, Struct, etc.).
pathNoOptional: directory to auto-index if no symbols are found yet. Defaults to src/ under the current working directory. Use this when searching a different project than the MCP server's cwd.
limitNo
queryYesThe symbol name or pattern to search for.
team_idNoThe team ID for isolation.
languageNoFilter by language (typescript, javascript, python, go, rust, java, c, cpp, csharp).
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It does this well by revealing that unindexed codebases trigger background indexing, require a retry, and are non-blocking. This is a meaningful side effect beyond a simple 'search' statement. It does not cover edge cases like invalid inputs or error responses, but the core behavior is transparent.

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?

Three sentences, each earning its place: what the tool does and returns, when to use it instead of grep, and what happens if the index is missing. The most decision-relevant information is front-loaded, with no filler or redundant restatement of the tool name.

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?

For a six-parameter tool with no output schema and no annotations, the description covers the essential context: result content, usage guidance, and the indexing/retry behavior. The schema handles the remaining parameter details. It is slightly incomplete in that it doesn't describe the response envelope, pagination, or limit behavior, but an agent has enough to invoke it correctly.

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 description coverage is high at 83%, so the structured schema already documents query, kind, path, team_id, and language. The description reinforces that query is a symbol name or pattern but adds little parameter-level meaning beyond the schema. This matches the baseline for high schema coverage.

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 opens with a specific verb and resource: 'Search for code symbols by name.' It also states the result shape: matching functions, classes, methods, etc. with file paths and line numbers. This clearly differentiates it from sibling tools like codegraph_callers or codegraph_callees, which explore relationships rather than symbol names.

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

Usage Guidelines4/5

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

The description gives an explicit routing rule: 'Use this INSTEAD of grep when looking for function/class/method definitions.' This is strong concrete guidance for when to invoke it. However, it does not explicitly contrast with related codegraph sibling tools such as codegraph_index, codegraph_list, or codegraph_impact.

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

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/tinhien11/remem-mcp'

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