Skip to main content
Glama
alexneargarder

unity-inspector-mcp

execute_code

Execute C# expressions in the Unity context. Uses Mono.CSharp.Evaluator - expects expressions, not statements

Instructions

Execute C# expressions in the Unity context. Uses Mono.CSharp.Evaluator - expects expressions, not statements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesC# expression to evaluate. Cannot use 'return' statements

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It discloses the underlying evaluator (Mono.CSharp.Evaluator) and the expression-only input constraint, but for a tool that executes arbitary code in a live Unity context, it omits the most important traits: that execution can mutate game state with side effects, what happens on compile/runtime errors, and whether the expression result is returned. The safety profile of a code-execution tool is completely undisclosed.

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?

A single, front-loaded sentence with zero filler. The action ('Execute C# expressions') comes first, and the evaluator detail plus input restriction follow in one compact clause. Every word carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity, potentially state-mutating tool (arbitary code execution in Unity) with no annotations and no output schema, the description is thin. It doesn't state what the evaluator returns, how errors are surfaced, whether execution is sandboxed, or that arbitrary expressions can alter the running game. An agent has no way to predict the outcome or risk of invoking it.

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 baseline is 3. The schema already documents the 'code' parameter and its 'Cannot use return statements' restriction; the description reinforces this with 'expects expressions, not statements' but adds no format, lifecycle, or context details beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Execute C# expressions in the Unity context') and adds a scoping constraint ('expects expressions, not statements') that conceptually separates it from sibling scripting tools like execute_script. However, it doesn't explicitly name any sibling, so differentiation is implied rather than stated.

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 phrase 'expects expressions, not statements' implies what inputs are valid and hints that this tool is for expression evaluation rather than script execution, but there is no explicit when-to-use guidance, no exclusions, and no named alternatives (e.g., use execute_script for multi-line scripts). Usage must be inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/alexneargarder/unity-inspector-mcp'

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