Skip to main content
Glama

gdscript_declaration

Find where a GDScript symbol is declared by navigating to its declaration site from any reference in your code.

Instructions

Navigate to the declaration of a symbol at a given position. Returns: file path and line number of the declaration. IMPORTANT: Uses ZERO-BASED coordinates (editor line 1 = pass line 0). Similar to gdscript_definition but returns the declaration site.

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?

With no annotations provided, the description carries full burden. It discloses important behavioral traits: the coordinate system (ZERO-BASED coordinates), what the tool returns (file path and line number), and the distinction from gdscript_definition. However, it doesn't mention error conditions, performance characteristics, or authentication needs.

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 efficiently structured with three sentences: purpose statement, return specification, and critical usage note. Every sentence adds essential information with zero wasted words, and the IMPORTANT warning is appropriately front-loaded.

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 navigation tool with no annotations and no output schema, the description provides good coverage of purpose, usage context, and behavioral constraints. It could be more complete by specifying error conditions or what happens with invalid positions, but it adequately covers the core functionality given the context.

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 fully documents all three parameters. The description reinforces the zero-based coordinate system but doesn't add meaningful semantic context beyond what's in the schema descriptions. This meets the baseline for high schema coverage.

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 clearly states the verb 'Navigate to' and resource 'declaration of a symbol', specifying it returns file path and line number. It explicitly distinguishes from sibling 'gdscript_definition' by noting it returns the declaration site, providing clear differentiation.

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 explicitly states when to use this tool versus alternatives: 'Similar to gdscript_definition but returns the declaration site.' This provides clear guidance on choosing between these two similar tools, though it doesn't mention other siblings like gdscript_references.

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