Skip to main content
Glama

compile

Submit an asynchronous LaTeX compile job and return immediately with its job_id (the compile keeps running on the server). Then you MUST poll compile_status with that job_id until status becomes succeeded/failed/cancelled. compile_status waits up to 5 seconds server-side; call it again directly without waiting yourself; cancelled means the user already cancelled the job — do not keep polling and do not retry the compile. Supports xelatex, pdflatex, and lualatex (engine 'auto' honors the entry file's '% !TeX program' magic comment). SUBMITS an async job: returns job_id immediately — poll compile_status(job_id) for the outcome and pdf_url.

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_id": "<project_id>"
    },
    "name": "compile"
  }
}

Input Schema

NameRequiredDescriptionDefault
engineNoauto
filenameNo
project_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses async submission semantics, that the job keeps running server-side, the server-side 5s wait on the status call, the meaning of the cancelled terminal state, and that no retry should occur. That is precisely the behavioral context an agent needs before firing a compile.

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

Conciseness3/5

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

The critical workflow is front-loaded and scannable, but the final sentence ('SUBMITS an async job: returns job_id immediately — poll compile_status(job_id) for the outcome and pdf_url') largely restates the first two sentences, adding only the pdf_url detail. That redundancy costs it a point.

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?

An output schema exists, so the description need not document return shape, and it still surfaces pdf_url. Combined with thorough workflow and engine semantics, it is nearly complete; only the meaning of filename/project_id and failure behavior beyond 'failed' remain unaddressed.

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 0%, so the description must compensate. It explains the engine parameter well beyond the enum values by noting that 'auto' honors the entry file's '% !TeX program' magic comment, but filename and project_id are never explained (e.g. whether filename selects the entry file or defaults to the project root). Coverage is therefore partial.

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 ('Submit an asynchronous LaTeX compile job') plus the immediate return of job_id, which cleanly separates it from compile_status (polling) and compile_log. An agent can pick between this and its siblings without opening any schema.

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?

Explicit workflow guidance: after submitting you MUST poll compile_status with the job_id until succeeded/failed/cancelled, call it again immediately since the server waits up to 5s, and do not keep polling or retry when the state is cancelled. Both when-to-use and when-to-stop are stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources