Skip to main content
Glama

Compile Preflight

compile_preflight
Read-only

Validate C# code without recompiling by using Roslyn to catch typos and errors in milliseconds before writing .cs files.

Instructions

Validate C# WITHOUT writing/recompiling (Roslyn). Use before writing .cs — catches typos in ~200ms vs 30s recompile. file_path: Assets-relative. new_content: full file. Returns OK preflight (ms) / ERR preflight + diagnostics / [ROSLYN UNAVAILABLE].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
new_contentYes
Behavior4/5

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

Discloses that the tool does not write or recompile (consistent with readOnlyHint=true) and adds valuable return behaviors: 'OK preflight (ms) / ERR preflight + diagnostics / [ROSLYN UNAVAILABLE]'. It also reveals the Roslyn dependency and typical latency, going beyond the basic annotation.

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?

Every sentence serves a purpose: purpose, when to use, parameter semantics, and return format. The description is compact, front-loaded with the key differentiator, and contains zero filler.

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 two-parameter read-only tool, the description covers the core needs: what it does, when to use it, parameter meanings, and return values. It leaves minor ambiguity about the structure of diagnostics and how to respond to 'ROSLYN UNAVAILABLE', but overall it is sufficient given the simple tool signature.

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's properties have only titles (no descriptions), so the description provides essential semantics: 'file_path: Assets-relative' and 'new_content: full file'. This adds meaning that the schema lacks, though it stops short of giving examples or value formats.

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 uses a specific verb ('Validate') with a clear resource ('C#') and immediately distinguishes itself from siblings by noting it does so 'WITHOUT writing/recompiling (Roslyn)'. This contrasts with compile/error tools like get_compile_errors and await_compile, making its unique purpose unambiguous.

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?

Explicitly states 'Use before writing .cs' and provides a performance comparison (~200ms vs 30s recompile), giving clear context for when to invoke it. It does not name alternative tools or explicitly say when not to use it, but the intended use case is strongly implied and sufficient for an agent.

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/german-krasnikov/unity-biome-mcp'

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