Skip to main content
Glama

Compile the document for diagnostics

compile

Type-checks the shared project and returns diagnostics without modifying files, so agents can confirm proposed edits are valid before a human accepts them.

Instructions

Type-checks the shared project and returns its diagnostics (errors/warnings + page count); never modifies the document. Uses the configured loopback compile service when one is set (--compile-url); otherwise falls back to the paired browser's live preview compiler. Call this after propose_files/propose_edit to confirm the change set type-checks before asking the human to Accept.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>"
    },
    "name": "compile"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectYesThe projectId of the project to work on, as returned by list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2026.11.16
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "The projectId of the project to work on, as returned by list_projects.",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "project"
      +]
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it declares the operation is non-mutating, explains backend routing (configured loopback compile service via --compile-url, otherwise the paired browser's live preview compiler), and describes the return payload. The fallback behavior is exactly the kind of environment-dependent trait an agent could not infer elsewhere.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the verb, return value, and the safety guarantee before the secondary backend detail. Dense but every clause carries information; the backend-routing sentence is long but justified since it explains non-obvious runtime behavior.

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

Completeness5/5

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

With no annotations and no output schema, the description compensates by stating the return contents (errors/warnings + page count), the non-mutation guarantee, and the backend selection logic. Nothing an agent needs in order to call this correctly and interpret the result is missing.

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?

The single parameter is fully described in the schema (projectId as returned by list_projects, with length bounds), so the schema already does the work. The description adds no format, sourcing, or failure semantics for the parameter beyond calling it 'the shared project', which is the baseline for 100% coverage.

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?

States a specific verb and resource (type-checks the shared project) plus what it returns (errors/warnings + page count), and immediately distinguishes itself from mutation siblings with 'never modifies the document'. An agent can tell this is the read-only validation step, not an edit operation.

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?

Gives explicit lifecycle guidance: call it after propose_files/propose_edit and before asking the human to Accept, which places it precisely relative to two named siblings. It stops short of stating when not to call it (e.g., on an unchanged project), so it is strong but not fully exhaustive.

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