Skip to main content
Glama

Compile a document family

fullbleed_compile
Destructive

Compile inline HTML/CSS into a retained handle with template statistics, ready for repeated fullbleed_render_compiled calls. Use instead of fullbleed_compile_vdp when reusing one template.

Instructions

Compile inline HTML/CSS and return compile_id plus template statistics for repeated calls to fullbleed_render_compiled. Handles belong to this server process; restart or eviction after 64 retained handles requires recompiling. Use fullbleed_compile_vdp for a single variable-data job without retaining a handle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoOptional inline print CSS; defaults to an empty stylesheet. Use @page for page size and margins. Compilation tools do not accept css_paths.
htmlYesNonempty inline static HTML. For variable records use {{slot_name}} placeholders and supply a bindings column for every slot. Compilation tools accept markup, not html_path.
font_pathsNoExisting embeddable font files under the MCP workspace root. Register these fonts before rendering; do not rely on system fonts. Relative paths are resolved from the server's --root.
pdf_vt_jobNoOptional Job/Record/Document hierarchy and private Fullbleed DPM for pdf_profile='pdfvt1'. Omit records to generate one record and document per input, compiled copy, or binding row.
pdf_profileNoPDF export profile; omitted means ordinary PDF. Read fullbleed_capabilities.pdf_profile_catalog for names and font, ICC, title, and timestamp requirements. This is separate from the render tool's dev/preflight/prod preset.
document_langNoDocument language for PDF metadata, as a BCP-47 tag such as 'en-US'.
document_titleNoHuman-readable title stored in PDF metadata. Required for pdfx4 and pdfvt1 output.
document_timestampNoPDF write date: UTC YYYY-MM-DDTHH:MM:SSZ, 'current', or 'source-date-epoch' (reads SOURCE_DATE_EPOCH). Required for pdfx4 and pdfvt1. Resolved once per engine; use an explicit value for repeatable output.
output_intent_infoNoOptional human-readable description of the output condition. Requires output_intent_icc_path.
output_intent_icc_pathNoExisting ICC profile file under the MCP workspace root, used as the PDF output intent. Required by PDF/A, PDF/X, and PDF/VT profiles.
output_intent_componentsNoICC color-component count: 1 for gray, 3 for RGB, 4 for CMYK. Defaults to 3 and must match the profile supplied by output_intent_icc_path.
output_intent_identifierNoNonblank output-condition identifier for the ICC output intent; defaults to 'Custom'. Requires output_intent_icc_path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv2.5.2
    • addedInput schema / properties / css / description
      Added value: +"Optional inline print CSS; defaults to an empty stylesheet. Use @page for page size and margins. Compilation tools do not accept css_paths."
    • addedInput schema / properties / document_lang / description
      Added value: +"Document language for PDF metadata, as a BCP-47 tag such as 'en-US'."
    • changedInput schema / properties / document_timestamp / description
      Previous value: -"UTC job write date YYYY-MM-DDTHH:MM:SSZ, current, or source-date-epoch. Resolved once when the engine is created."New value: +"PDF write date: UTC YYYY-MM-DDTHH:MM:SSZ, 'current', or 'source-date-epoch' (reads SOURCE_DATE_EPOCH). Required for pdfx4 and pdfvt1. Resolved once per engine; use an explicit value for repeatable output."
    • addedInput schema / properties / document_title / description
      Added value: +"Human-readable title stored in PDF metadata. Required for pdfx4 and pdfvt1 output."
    • changedInput schema / properties / font_paths / description
      Previous value: -"Workspace-relative embeddable font paths."New value: +"Existing embeddable font files under the MCP workspace root. Register these fonts before rendering; do not rely on system fonts. Relative paths are resolved from the server's --root."
    • addedInput schema / properties / html / description
      Added value: +"Nonempty inline static HTML. For variable records use {{slot_name}} placeholders and supply a bindings column for every slot. Compilation tools accept markup, not html_path."
    • addedInput schema / properties / output_intent_components / description
      Added value: +"ICC color-component count: 1 for gray, 3 for RGB, 4 for CMYK. Defaults to 3 and must match the profile supplied by output_intent_icc_path."
    • changedInput schema / properties / output_intent_icc_path / description
      Previous value: -"Workspace-relative ICC profile path."New value: +"Existing ICC profile file under the MCP workspace root, used as the PDF output intent. Required by PDF/A, PDF/X, and PDF/VT profiles."
    • addedInput schema / properties / output_intent_identifier / description
      Added value: +"Nonblank output-condition identifier for the ICC output intent; defaults to 'Custom'. Requires output_intent_icc_path."
    • addedInput schema / properties / output_intent_info / description
      Added value: +"Optional human-readable description of the output condition. Requires output_intent_icc_path."
    • addedInput schema / properties / pdf_profile / description
      Added value: +"PDF export profile; omitted means ordinary PDF. Read fullbleed_capabilities.pdf_profile_catalog for names and font, ICC, title, and timestamp requirements. This is separate from the render tool's dev/preflight/prod preset."
    • addedInput schema / properties / pdf_vt_job / description
      Added value: +"Optional Job/Record/Document hierarchy and private Fullbleed DPM for pdf_profile='pdfvt1'. Omit records to generate one record and document per input, compiled copy, or binding row."
    • addedInput schema / properties / pdf_vt_job / properties / id / description
      Added value: +"Nonblank part identifier, at most 4096 UTF-8 bytes. Record IDs must be unique in the job; document IDs must be unique within their record."
    • addedInput schema / properties / pdf_vt_job / properties / records / items / properties / documents / description
      Added value: +"Ordered documents in this record. Each consumes one input document, compiled copy, or binding row; final pagination supplies its page range."
    • addedInput schema / properties / pdf_vt_job / properties / records / items / properties / documents / items / properties / id / description
      Added value: +"Nonblank part identifier, at most 4096 UTF-8 bytes. Record IDs must be unique in the job; document IDs must be unique within their record."
    • addedInput schema / properties / pdf_vt_job / properties / records / items / properties / id / description
      Added value: +"Nonblank part identifier, at most 4096 UTF-8 bytes. Record IDs must be unique in the job; document IDs must be unique within their record."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, non-idempotent and non-read-only, so safety is covered. The description adds genuinely useful context the annotations cannot: the returned handle is process-scoped, dies on restart, and is evicted after 64 retained handles, forcing recompilation. It still does not say what the compile writes or whether recompiling is cheap, which keeps it short of a 5.

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 sentences, no filler: artifact/return value first, then the handle lifecycle caveat, then the alternative route. Every sentence earns its place and the most decision-relevant information is 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?

With an output schema present, the description needn't explain returns, and it correctly focuses on what structured data cannot convey: handle lifetime and the sibling split. The remaining gap is behavioral detail around the destructive/non-idempotent profile (what is written where, cost of recompiling), which matters for a 12-parameter compile tool.

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 100% across 12 parameters, including the nested pdf_vt_job hierarchy and profile requirements, so the schema carries the load. The description only reinforces the inline HTML/CSS nature of the input and adds nothing about individual parameters (profiles, intents, timestamps), which is the baseline 3 case.

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 ('Compile inline HTML/CSS') and names its output artifact (compile_id plus template statistics), which immediately distinguishes it from the render tools. It also explicitly differentiates itself from fullbleed_compile_vdp, so an agent can route without opening either schema.

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 a clear when-to-use ('for repeated calls to fullbleed_render_compiled') and names an alternative (fullbleed_compile_vdp) with the condition that selects it (single variable-data job without retaining a handle). It does not address the other compile-adjacent siblings such as fullbleed_render or preflight presets, so routing is clear for the main fork but not exhaustive.

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