Skip to main content
Glama

unity_get_compilation_errors

Retrieve C# compilation errors and warnings directly from Unity's CompilationPipeline. Bypasses console log buffer to ensure accurate results unaffected by clears or Play Mode log flooding. Specify count, severity filter, and target Unity instance port.

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?

Description explains behavioral traits: uses CompilationPipeline directly, independent of console log, not affected by console clear or Play Mode log flooding, returns errors from last compilation cycle. No annotations provided, so description carries the full burden and does so 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?

Four sentences, each adding distinct value. Front-loaded with purpose, then behavioral transparency, then usage guidance, then param hint. No redundant information.

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 no output schema, description adequately explains what the tool returns (errors/warnings from last compilation cycle) and its relationship to console log. Could mention return format (e.g., structured list of messages with line numbers), but overall sufficient for agent to decide invocation.

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 has 100% coverage, describing all three parameters. Description adds value by explaining the port parameter's purpose for parallel-safe routing and referencing unity_select_instance. However, no additional details for count or severity 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 from Unity Editor, specifically using CompilationPipeline. It distinguishes itself from sibling unity_console_log by clarifying it is independent of the console log buffer and not affected by console clear or Play Mode log flooding.

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 'Use this instead of unity_console_log when diagnosing script compilation issues', providing clear when-to-use guidance and an alternative sibling tool.

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