Skip to main content
Glama

search_code

Find code symbols (functions, classes, methods) by topic or keyword with full-text search. Filter by symbol kind for precise results.

Instructions

Full-text search over indexed symbols (functions, classes, methods, enums, etc.).

Use when looking for symbols by topic or keyword rather than exact name. Prefer lookup_symbol when you already know the symbol name.

FTS5 syntax:

  • init* matches init, init_uart, initialize (trailing wildcard)

  • "spi init" matches the exact phrase "spi init"

  • Do NOT use underscore in queries — modem_init is split into modem AND init. Use modem init instead.

Kind filter values: function, method, constructor, destructor, class, struct, enum, enum_constant, typedef, variable, field, namespace.

Args: query: Search term(s) with FTS5 syntax. Keep queries short — 1–3 words. project_root: Absolute path to the project. Defaults to nearest git root. kind: Optional filter to return only symbols of this kind. limit: Maximum number of results (default 20, max 100).

Returns: list of dicts, each with: name, qualified_name, kind, file, line, is_definition, signature, docstring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesFTS5 search terms. 1-3 words, omit underscores. E.g. 'modem init' not 'modem_init'. Supports trailing wildcard 'modem*'.
project_rootNoProject root. Auto-detected if omitted.
kindNoOptional kind filter: function, method, class, struct, enum, typedef, variable, field, namespace.
limitNoMaximum results (default 20, max 100).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses FTS5 query behavior (trailing wildcard, phrase matching, underscore splitting), kind filter values, and return fields. No annotations provided, so description carries full burden; lacks mention of potential side effects or performance constraints beyond max results.

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

Conciseness4/5

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

Well-structured with sections for purpose, usage, syntax, kind filters, and args. Information is front-loaded and essential; minor redundancy in syntax repetition but overall efficient.

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 return format. With no annotations and presence of output schema (implied by return description), the description is almost complete, though missing error scenarios or authentication details.

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 coverage is 100% (baseline 3), but description adds value by explaining underscore splitting, query length recommendation, project root auto-detection, and detailed kind filter list, going beyond 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 it performs 'Full-text search over indexed symbols' and distinguishes itself from sibling tools like lookup_symbol by specifying it's for topic/keyword search rather than exact name lookup.

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?

Explicit usage guidance: 'Use when looking for symbols by topic or keyword rather than exact name. Prefer lookup_symbol when you already know the symbol name.' Also provides FTS5 syntax tips and kind filter values.

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/turbyho/fw-context-mcp'

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