Skip to main content
Glama

unity_get_compilation_errors

Retrieve C# compilation errors and warnings from the Unity Editor using CompilationPipeline to diagnose script issues independent of console log buffer.

Instructions

Get C# compilation errors and warnings from the Unity Editor. Uses CompilationPipeline directly — independent of the console log buffer. Not affected by console clear or Play Mode log flooding. Returns errors from the last compilation cycle. Use this instead of unity_console_log when diagnosing script compilation issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoMax number of entries to retrieve (default: 50)
severityNoFilter: 'error', 'warning', or 'all' (default: 'all')
portNoTarget Unity instance port for parallel-safe routing. Get this from unity_select_instance. When working with multiple Unity instances, ALWAYS include this parameter.
Behavior4/5

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

Describes internal behavior (CompilationPipeline, independent of console) and return scope (last compilation cycle), though lacks detail on potential side effects or prerequisites.

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?

Three focused sentences: purpose, behavioral advantage, and usage guidance. No fluff, 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?

Adequately covers what it returns and when to use; no output schema needed due to simple return type implied. Minor gap: does not mention if errors are available without prior compilation.

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 provides full coverage (100%) with clear descriptions; description adds no additional parameter details beyond schema.

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 the tool retrieves C# compilation errors and warnings using CompilationPipeline, independent of console buffer, distinguishing it from unity_console_log.

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 says to use this instead of unity_console_log when diagnosing compilation issues, and notes it is unaffected by console clear or Play Mode flooding.

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/AnkleBreaker-Studio/unity-mcp-server'

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