Skip to main content
Glama
Search Code MCP

Search Code MCP

by joutvhu

Find Symbols

find_symbols
Read-onlyIdempotent

Locate symbol definitions like functions, classes, and variables across files or directories, filter by kind and exact match, or outline a single file without reading it fully.

Instructions

Locate symbol definitions (functions, classes, interfaces, methods, types, variables, structs, enums, traits, modules) with filtering by 'kinds' and 'exactMatch'. Pass a single file as 'path' with empty 'name' to get a full symbol outline without reading the whole file.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_symbols"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoSymbol name or substring to match (case-insensitive unless exactMatch=true). Leave empty ('') with a file or folder 'path' to list all symbols as an outline.
pathNoFile or directory to inspect (relative or absolute; default: '.'). Pass a single file path with empty 'name' to get that file's symbol outline..
kindsNoOptional filter by symbol kinds: 'function', 'class', 'interface', 'method', 'variable', 'type', 'struct', 'enum', 'trait', 'module', 'other'.
exactMatchNoIf true, matches exact symbol name; if false (default), matches substring.
maxResultsNoMaximum number of symbols to return (1-500, default: 100).
filePatternNoGlob pattern to filter files, e.g. '*.ts' or '*.{ts,tsx}'.
includeLocalsNoIf true, include local function/method variables. Default: false (focuses on top-level declarations, classes, interfaces, functions, methods, types).
excludePatternNoComma-separated glob patterns to exclude, e.g. '**/node_modules/**,**/dist/**'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv1.1.0
    • changedInput schema / properties / exactMatch / description
      Previous value: -"If true, only match exact symbol name. If false (default), matches prefix or substring"New value: +"If true, matches exact symbol name; if false (default), matches substring."
    • changedInput schema / properties / excludePattern / description
      Previous value: -"Glob pattern to exclude, e.g. '**/node_modules/**', '**/dist/**'"New value: +"Comma-separated glob patterns to exclude, e.g. '**/node_modules/**,**/dist/**'."
    • changedInput schema / properties / filePattern / description
      Previous value: -"Glob pattern to filter files, e.g. '*.ts' or '*.py'"New value: +"Glob pattern to filter files, e.g. '*.ts' or '*.{ts,tsx}'."
    • removedInput schema / properties / fileType
      Removed value: -{
      -  "description": "File type filter, e.g. 'ts', 'py', 'rust', 'go'",
      -  "type": "string"
      -}
    • addedInput schema / properties / includeLocals
      Added value: +{
      +  "default": false,
      +  "description": "If true, include local function/method variables. Default: false (focuses on top-level declarations, classes, interfaces, functions, methods, types).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / kinds / description
      Previous value: -"Filter by symbol kinds: 'function', 'class', 'interface', 'method', 'variable', 'type', 'struct', 'enum', 'trait', 'module'"New value: +"Optional filter by symbol kinds: 'function', 'class', 'interface', 'method', 'variable', 'type', 'struct', 'enum', 'trait', 'module', 'other'."
    • changedInput schema / properties / maxResults / description
      Previous value: -"Maximum number of symbols to return (default: 100)"New value: +"Maximum number of symbols to return (1-500, default: 100)."
    • addedInput schema / properties / maxResults / maximum
      Added value: +500
    • addedInput schema / properties / maxResults / minimum
      Added value: +1
    • changedInput schema / properties / maxResults / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / name / description
      Previous value: -"Symbol name or substring pattern to find (leave empty to list all symbols in target path)"New value: +"Symbol name or substring to match (case-insensitive unless exactMatch=true). Leave empty ('') with a file or folder 'path' to list all symbols as an outline."
    • removedInput schema / properties / noIgnore
      Removed value: -{
      -  "default": false,
      -  "description": "Whether to search inside gitignored files",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / outputFormat
      Removed value: -{
      -  "default": "table",
      -  "description": "Output format: 'table' (default markdown table), 'json', or 'compact' (file:line: [kind] name)",
      -  "enum": [
      -    "table",
      -    "json",
      -    "compact"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / path / description
      Previous value: -"File or directory to search symbols in. Accepts relative or absolute paths (default: '.')"New value: +"File or directory to inspect (relative or absolute; default: '.'). Pass a single file path with empty 'name' to get that file's symbol outline."
  2. 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: '.')"
  3. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is fully covered by structured data. The description adds the non-obvious outline mode (empty name + file path), but says nothing about result ordering, truncation at maxResults, or what the returned symbol records look like. With annotations carrying the behavioral load, a 3 is appropriate.

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?

Two sentences, front-loaded with the core action and then the power-user trick. The parenthetical symbol-type list is long and largely duplicates the 'kinds' enum in the schema, which is a small amount of wasted surface, but nothing is buried or padded.

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?

This is an 8-parameter tool with no output schema, so the description carries some burden for explaining what comes back; it never describes the return shape, ordering, or how results are truncated at maxResults. It also leaves 'includeLocals', 'filePattern', and 'excludePattern' entirely to the schema. Adequate but with clear gaps for a tool of this complexity.

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%, so the baseline is 3, but the description earns an extra point by surfacing the non-obvious interaction between 'name' and 'path' (empty name plus file path yields an outline) and by naming 'kinds' and 'exactMatch' as the filtering levers. It still omits any mention of 'includeLocals', 'filePattern', or 'excludePattern', which materially change result scope.

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?

Opens with a specific verb+resource ('Locate symbol definitions') and enumerates the symbol types covered, so the agent knows exactly what domain this tool operates on. It falls short of a 5 because it never distinguishes itself from the sibling 'search' tool, which an agent could plausibly pick for a similar-looking lookup.

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?

Gives one concrete usage recipe: pass a single file as 'path' with an empty 'name' to get a symbol outline. That is genuinely useful guidance, but there is no statement about when to prefer this over 'search' or 'list_files', and no exclusions or cost/limit warnings, so the routing guidance is implied rather than explicit.

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