Skip to main content
Glama

gdscript_definition

Read-only

Navigate to the definition of a symbol in a GDScript file using zero-based line and character positions. Returns the file path and line number of the symbol's definition.

Instructions

Navigate to the definition of a symbol at a given position. Returns: file path and line number where the symbol is defined. IMPORTANT: Uses ZERO-BASED coordinates (editor line 1 = pass line 0). Use when you need to find where a function, variable, or class is defined.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesAbsolute or relative path to the .gd file
lineYesZero-based line number (editor line - 1)
characterYesZero-based character position
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the tool is safe and read-only. The description adds that it uses zero-based coordinates and returns file path and line number, which is helpful behavioral context. No contradictions with annotations.

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?

The description is two sentences plus an important warning. No wasted words, front-loads the key action and return value. The all-caps IMPORTANT effectively draws attention to coordinate detail.

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 3 parameters, no output schema, and annotations, the description fully covers purpose, return info (file path and line number), and the crucial zero-based coordinate requirement. It is complete for the agent to use effectively.

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 schema already documents parameters. The description reinforces the critical zero-based coordinate usage with an all-caps warning, adding value beyond the schema. This is slightly above the baseline of 3.

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?

Description clearly states 'Navigate to the definition of a symbol' which is a specific verb+resource. It distinguishes from siblings like gdscript_references by specifying it returns the definition location. The explicit 'Use when you need to find where a function, variable, or class is defined' reinforces the purpose.

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

Usage Guidelines4/5

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

The description explicitly states when to use the tool: 'Use when you need to find where a function, variable, or class is defined.' It does not explicitly mention alternatives or when not to use, but the sibling list provides context. This is clear usage guidance but could be improved with direct comparison to gdscript_references or gdscript_hover.

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/pzalutski-pixel/godotlens-mcp'

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