Skip to main content
Glama

gdscript_definition

Find where GDScript functions, variables, or classes are defined by navigating to symbol definitions with file path and line number.

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?

With no annotations provided, the description carries full burden and adds valuable context: it specifies the return format (file path and line number), highlights the zero-based coordinate system with an IMPORTANT note, and clarifies it's for definition lookup. It doesn't mention error handling or performance, but covers key behavioral aspects well.

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?

Front-loaded with the core purpose, followed by return details and a crucial warning about coordinates, ending with usage guidance. Every sentence earns its place without redundancy, making it efficient and well-structured.

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?

Given 3 parameters with full schema coverage and no output schema, the description is complete enough: it explains the tool's purpose, return values, coordinate system, and usage context. It could mention error cases or limitations, but covers essentials for a read-only navigation tool.

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 description coverage is 100%, so the baseline is 3. The description adds value by emphasizing the zero-based coordinates and relating them to editor lines, which clarifies the parameter semantics beyond the schema's technical descriptions. However, it doesn't detail parameter interactions or edge cases.

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 the definition' and resource 'symbol at a given position', specifying it works for functions, variables, or classes. It distinguishes from siblings like gdscript_declaration, gdscript_references, and gdscript_symbols by focusing on definition lookup rather than declarations, references, or symbol listing.

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?

Explicitly states 'Use when you need to find where a function, variable, or class is defined,' providing clear context for when to invoke this tool. It implies alternatives like gdscript_declaration or gdscript_references are for different purposes, though it doesn't name them directly.

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