Skip to main content
Glama

Find definitions by name

go_to_definition

Locate definition sites for any name across the indexed workspace. Optionally rank results by proximity to a reference file, and automatically build missing indexes on first call.

Instructions

Definition sites of a name across the indexed workspace, nearest to the optional file first. If the index for root does not exist yet it is built automatically (first call may be slow).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoreference file for proximity ranking
nameYesdefinition name
rootNoindex root to query; required when several indexes exist
limitNomax definitions returned (default 50, hard max 200)
offsetNoskip the first N definitions before applying limit
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it deliberately disloses the key side effect: 'If the index for root does not exist yet it is built automatically (first all may be slow).' It also reveals proximity ordering behavior. It stops short of describing return shape or failure modes, but the most consequential 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?

Two sentences: the first front-loads purpose and scope, the second adds the critical performance caveat. Every word earns its place; no fluff, no repetition of schema content.

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 5-parameter tool with no output schema and no annotations, the description covers scope, ordering, and the auto-index side effect, and the schema fully documents all parameters. It lacks an explicit statement of the return format and no-match or multi-index error cases, but the go-to-definition mental model is well supported.

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, and the description adds value beyond the schema: it ties the auto-index-build behavior to the root parameter and clarifies the ranking semantics of file ('nearest ... first'), reinforcing the schema's 'reference file for proximity ranking' with concrete behavior.

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 states a specific operation — locating 'definition sites of a name across the indexed workspace' — with a clear scope and ordering rule. This distinguishes it from read_definition (which reads content), find_references (which finds usages), and list_definitions (which lists without a name filter).

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?

The description implies usage context: proximity ranking via 'nearest to the optional file first' and an index-build caveat. However, with 14 siblings including closely related tools like read_definition, find_references, and ast_search, it never explicitly says when to choose this tool over an alternative or when not to use it.

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/zhaoxingxing06/kimi-tree-lens'

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