Skip to main content
Glama

evaluate_expression

Read-onlyIdempotent

Execute arbitrary GDScript expressions at runtime and receive the result, enabling real-time debugging and state inspection.

Instructions

Execute an arbitrary GDScript expression at runtime and return the result. The expression runs in the context of the current scene (e.g., "get_tree().current_scene.name", "Vector2(1,2).length()"). Useful for debugging, querying state, and one-off calculations. The project must be running via run_interactive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesThe GDScript expression to evaluate (e.g., "get_tree().current_scene.name", "$Player.position", "2 + 2").
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds valuable context beyond annotations: the expression runs in the context of the current scene and requires the project to be running via run_interactive. It does not discuss error handling or potential side effects of arbitrary expressions, but the annotation bar is low and the added context earns a 4.

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 four sentences long, front-loaded with the core purpose, and every sentence earns its place: function, context/examples, use cases, and prerequisite. No fluff or repetition.

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 simple one-parameter tool with annotations covering safety and no output schema, the description is reasonably complete. It covers the purpose, usage context, execution context, and the critical prerequisite of run_interactive. It could mention error behavior or result formatting, but these are not essential for this tool type.

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?

The input schema has 100% coverage with clear examples for the expression parameter. The description adds meaning beyond the schema by explaining the execution context (current scene) and the runtime prerequisite, which helps the agent understand how to construct valid expressions. This exceeds the baseline 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?

The description clearly states the tool executes an arbitrary GDScript expression at runtime and returns the result, with concrete examples. It distinguishes itself from siblings like call_method (method call) and execute_script (script execution) by focusing on arbitrary expressions evaluated in the current scene context.

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 provides clear usage context: useful for debugging, querying state, and one-off calculations. It also states the prerequisite that the project must be running via run_interactive, giving a specific when-to-use condition. However, it does not explicitly name alternatives or exclusion cases, so it isn't a full 5.

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/Vollkorn-Games/godot-mcp'

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