Skip to main content
Glama
Lipdog
by Lipdog

find_symbol

Read-onlyIdempotent

Find definition locations of symbols like functions and classes in a GitHub repository or across all of GitHub, with AST-precise matching for nine programming languages.

Instructions

Goto-definition: find where a symbol is defined in one repo or across all of GitHub.

How it works: queries GitHub's code-search index for files containing
the symbol name, parallel-fetches the top ~15 candidate files, parses
each with tree-sitter, and queries the AST for declaration nodes
(class, function, struct, trait, interface, etc.) whose name matches
exactly. Results are ranked with type-declaring kinds
(class/struct/trait) first, then functions, then methods, then
variables. Success responses include real absolute line numbers and
ripgrep-style context (2 lines above, match line, 5 lines below)
pulled from the full file, not GitHub's 3-line fragment.

Languages with AST-precise matching via tree-sitter: Python, JavaScript,
TypeScript, Go, Rust, Java, Ruby, C, C++. Other languages fall back to
a regex-on-fragment path that is less precise but still useful.

Best for **distinctive** symbol names — `FastMCP`, `DataLoader`,
`ClaudeAgentOptions`, `Runtime`, `Tokenizer`. These are names creators
chose to be findable, and the first-declaration-wins ranking is
almost always right.

NOT for generic names like `connect`, `handle`, `init`, `get`, `run`
that show up in every library. GitHub's text-relevance ranking puts
usage-heavy files above the one declaring them, so the declaration
file often isn't in the top 15 we fetch. For generic names, use
`search_code` with disambiguating keywords (e.g.
`search_code("export function connect", repo="reduxjs/react-redux")`)
or combine with `path:` qualifier to narrow the search.

NOT for finding call-sites or usage patterns — use `search_code`
with the symbol name and a `repo:` qualifier for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSymbol name (function, class, type, variable).
repoNoScope to one repo (owner/repo). Omit for cross-repo search.
languageNoFilter by programming language.
kindNoReserved for future kind filtering.
pathNoFile path filter (e.g. src/).
pageNoResult page.
per_pageNoResults per page (max 100).
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds extensive behavioral details: how the tool queries GitHub's code-search index, parallel-fetches candidate files, parses with tree-sitter, ranks results (type-declaring kinds first), and provides response format (absolute line numbers, context lines). It also covers language-specific behavior and fallback mechanisms.

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?

The description is relatively long but well-structured with clear sections, bullet points, and a 'How it works' explanation. While every sentence adds value, it could be slightly more concise without losing essential information. The front-loading of the core purpose is good.

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

Completeness5/5

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

Given the tool's complexity (symbol definition across repos, AST parsing, ranking), the description is highly complete. It covers use cases, limitations, fallback behavior, and response format. Even without an output schema, the description explains what results include (line numbers, context lines), making it sufficient for an agent to understand the tool's full behavior.

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 coverage is 100%, so baseline is 3. The description does not add new parameter-level details beyond what the schema already provides (e.g., the 'name' parameter is described in schema as 'Symbol name' and description doesn't elaborate further). However, the description sets overall context for parameters like 'repo' and 'language' by explaining when to use them.

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 explicitly states 'find where a symbol is defined', uses specific verb 'find' and resource 'symbol definition', and contrasts with sibling tools like search_code for usage patterns. It clearly distinguishes its purpose from other tools.

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?

The description provides explicit guidance on when to use this tool ('best for distinctive symbol names') and when not ('NOT for generic names'), with concrete alternatives such as using search_code with disambiguating keywords. It also specifies limitations for generic names and call-sites.

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/Lipdog/fossick-mcp'

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