Skip to main content
Glama
Search Code MCP

Search Code MCP

by joutvhu

find_symbols

Search a codebase for functions, classes, interfaces, methods, types, variables, structs, and enums by name or pattern. Filter results by symbol kind, file type, path, and glob pattern.

Instructions

Find code symbols (functions, classes, interfaces, methods, types, variables, structs, enums) across the codebase. Automatically selects best available engine: Universal Ctags -> ast-grep -> ripgrep regex heuristic.

Input Schema

NameRequiredDescriptionDefault
nameNoSymbol name or substring pattern to find (leave empty to list all symbols in target path)
pathNoFile or directory to search symbols in. Accepts relative or absolute paths (default: '.').
kindsNoFilter by symbol kinds: 'function', 'class', 'interface', 'method', 'variable', 'type', 'struct', 'enum', 'trait', 'module'
fileTypeNoFile type filter, e.g. 'ts', 'py', 'rust', 'go'
noIgnoreNoWhether to search inside gitignored files
exactMatchNoIf true, only match exact symbol name. If false (default), matches prefix or substring
maxResultsNoMaximum number of symbols to return (default: 100)
filePatternNoGlob pattern to filter files, e.g. '*.ts' or '*.py'
outputFormatNoOutput format: 'table' (default markdown table), 'json', or 'compact' (file:line: [kind] name)table
excludePatternNoGlob pattern to exclude, e.g. '**/node_modules/**', '**/dist/**'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.2
    • changedInput schema / properties / path / description
      Previous value: -"File or directory to search symbols in (default: '.')"New value: +"File or directory to search symbols in. Accepts relative or absolute paths (default: '.')"
  2. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations provided, so the description carries the full burden. It discloses the engine fallback chain (ctags -> ast-grep -> ripgrep) which is useful behavioral context, but omits auth requirements, rate limits, or what happens when no engine is available. Also doesn't mention output shape or result limits beyond what schema already shows.

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?

Two sentences, front-loaded with the primary purpose and symbol kinds, followed by the engine fallback. No wasted words and appropriately sized.

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?

For a search tool with no output schema and no annotations, the description covers purpose and engine behavior but omits return format details, pagination/maxResults behavior beyond schema, and error conditions. It's adequate but not complete for full behavioral transparency.

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 100%, so the schema already documents all 10 parameters including defaults and enum values. The description adds no parameter-specific guidance beyond what the schema provides. Baseline 3 is correct when schema fully covers 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?

States a specific verb ('Find') and resource ('code symbols') and enumerates the kinds (functions, classes, interfaces, etc.). Clearly distinguishes from siblings like search, dump_tree, list_files by being symbol-aware rather than raw text/tree listing.

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

Usage Guidelines3/5

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

Usage is implied by 'Find code symbols... across the codebase' but no explicit when-to-use vs alternatives is given. It doesn't say when to use find_symbols instead of search or dump_tree, though the symbol kind enumeration hints at its niche.

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

Deploy Server

Other Tools