Skip to main content
Glama

export_marked_pdf

Writes a distribution-ready marked-up PDF of a takeoff, combining a legend cover, per-sheet takeoff shapes, quantities, annotations, and approval marks for sharing or review.

Instructions

The MARKED-UP PLANSET — the deliverable of every takeoff. Writes a distribution-ready PDF to disk: a legend cover (per-condition totals, swatches, a by-sheet breakdown) followed by every sheet that carries takeoff shapes or annotations, vector-copied from the source plan with the work burned in as drawn — condition colors and hatches, a quantity chip on every shape, annotation clouds/callouts/highlights, and approval marks (the estimator's APPROVED rings, the agent's AGENT diamonds — the cover tallies the split). Built by the same module as the canvas's MARKED SET button, so agent output and app output are one implementation. Every page carries a light diagonal "OpenTakeoff" and the line "Prepared with OpenTakeoff · opentakeoff.kentucky-ai.com". A construction takeoff is no good without markup: finish EVERY takeoff by writing this file and giving the user its path (export_report carries the numbers for pricing; this carries the evidence). When the shapes were machine-traced and unreviewed, the document says so on its last page — the review path is importing the export_takeoff payload into the app, where agent shapes arrive as pencil proposals. Default path: next to the loaded plan as " - marked set.pdf". Needs no native canvas — pure vector copy, so it works even where view_sheet cannot render. The one source it refuses: an ENCRYPTED plan PDF (owner password, empty user password — it opens everywhere, but its pages cannot be vector-copied and there is no canvas here to render them); the refusal names the sheet — export the marked set from the app, or supply an unencrypted PDF.

Input Schema

NameRequiredDescriptionDefault
pathNoWhere to write the PDF (default: "<plan dir>/<plan> - marked set.pdf")
overwriteNoReplace the file at path even when it is not an OpenTakeoff export. Off by default: re-exporting over a previous export of your own already overwrites without this, so you only need it to deliberately destroy an unrelated file.
project_nameNoCover-page project name (default: the plan file's name)

Output Schema

NameRequiredDescriptionDefault
noteYes
pathYesAbsolute path of the written marked-set PDF — hand this to the user
pagesYesLegend cover + the RFI schedule page(s) when any RFI is live + one page per marked sheet
rfis_printedYesLive RFIs printed on the RFI schedule page (#364) — agent-raised and panel-raised alike; withdrawn ones leave a numbering gap
shapes_drawnYes
sheets_markedYesSheets carrying shapes, annotations, or approval marks — unmarked sheets are omitted
approvals_drawnYesApproval-family glyphs burned in (#176) — estimator APPROVED rings + agent AGENT diamonds; the cover tallies the split when any exist
annotations_drawnYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.21
    • changedOutput schema / properties / pages / description
      Previous value: -"Legend cover + one page per marked sheet"New value: +"Legend cover + the RFI schedule page(s) when any RFI is live + one page per marked sheet"
    • addedOutput schema / properties / rfis_printed
      Added value: +{
      +  "description": "Live RFIs printed on the RFI schedule page (#364) — agent-raised and panel-raised alike; withdrawn ones leave a numbering gap",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "path",
      -  "pages",
      -  "sheets_marked",
      -  "shapes_drawn",
      -  "annotations_drawn",
      -  "approvals_drawn",
      -  "note"
      -]New value: +[
      +  "path",
      +  "pages",
      +  "sheets_marked",
      +  "shapes_drawn",
      +  "annotations_drawn",
      +  "approvals_drawn",
      +  "rfis_printed",
      +  "note"
      +]
  2. Changed1 schema field changedv0.1.15
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "description": "Replace the file at path even when it is not an OpenTakeoff export. Off by default: re-exporting over a previous export of your own already overwrites without this, so you only need it to deliberately destroy an unrelated file.",
      +  "type": "boolean"
      +}
  3. Changed3 schema fields changedv0.1.12
    • addedOutput schema / properties / approvals_drawn
      Added value: +{
      +  "description": "Approval-family glyphs burned in (#176) — estimator APPROVED rings + agent AGENT diamonds; the cover tallies the split when any exist",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / sheets_marked / description
      Previous value: -"Sheets carrying shapes or annotations — unmarked sheets are omitted"New value: +"Sheets carrying shapes, annotations, or approval marks — unmarked sheets are omitted"
    • changedOutput schema / required
      Previous value: -[
      -  "path",
      -  "pages",
      -  "sheets_marked",
      -  "shapes_drawn",
      -  "annotations_drawn",
      -  "note"
      -]New value: +[
      +  "path",
      +  "pages",
      +  "sheets_marked",
      +  "shapes_drawn",
      +  "annotations_drawn",
      +  "approvals_drawn",
      +  "note"
      +]
  4. Addedv0.1.9

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden and does well: it discloses that the file is written to disk, the default path naming, that unreviewed machine-traced shapes are flagged on the last page, that every page is watermarked, and the exact refusal case for encrypted PDFs. It does not, however, say whether the write is reversible, whether an existing export is silently replaced (the schema's overwrite param partially covers this), or what the tool returns on success — though an output schema exists.

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?

The first sentence front-loads the deliverable and the content enumeration follows logically, with the constraint/refusal case last. It is dense with genuinely useful operational detail, though some rhetorical flourish ('A construction takeoff is no good without markup') and repetition of the default path from the schema could be trimmed.

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?

For a three-parameter, optional-all export tool with an output schema and no annotations, the description covers the gaps an agent would otherwise have to guess: default output location, overwrite behavior, watermarking, disclosure of unreviewed shapes, and the encryption failure mode. Nothing essential to calling it correctly 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?

Schema description coverage is 100%, so all three parameters (path, overwrite, project_name) are already fully documented in the schema, including the overwrite safety semantics. The description adds only the default filename pattern ('<plan> - marked set.pdf'), which duplicates the schema's default text. Baseline 3 is appropriate since the schema does the heavy lifting.

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 opens with a concrete verb and resource ('Writes a distribution-ready PDF to disk') and enumerates exactly what the file contains: legend cover with per-condition totals, all marked sheets, quantity chips, annotation clouds, approval marks. It explicitly distinguishes itself from the nearest sibling by contrasting with export_report ('export_report carries the numbers for pricing; this carries the evidence') and from export_dxf/export_takeoff.

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?

It states a positive directive ('finish EVERY takeoff by writing this file and giving the user its path'), names the alternative and what it is for, and describes the review workflow (import export_takeoff payload into the app). It also names the one condition where the tool must be avoided (encrypted plan PDFs) and prescribes the fallback path.

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