Skip to main content
Glama

export_report

Export computed takeoff quantities with waste applied, per-condition buy lists, and project roll-ups as JSON for pricing consumers.

Instructions

The computed Report document — "opentakeoff.report.v1", the same schema the canvas Report's JSON export writes. Everything a pricing consumer needs without re-implementing the app's math: per-condition quantities with waste and multiplier applied (gross and *_net), the computed materials BUY LIST per condition (order quantity = basis ÷ coverage rate, rounded up to whole purchase units) plus the project-wide roll-up summed by (name, unit), per-sheet BASE subtotals, scale provenance per sheet, and annotations. Contrast: export_takeoff is the raw canvas payload (materials as CONFIG rows, no computed quantities) and takeoff_summary strips materials for a compact reply — when the numbers are leaving for pricing, consume this. A report alone is HALF the deliverable: pair it with export_marked_pdf, because a takeoff is reviewed on marked drawings, not on numbers. Returned inline; pass path to also write it to disk as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoFile path to write the document to
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_nameNoLabel for the document's project_name field (a headless session has no project of its own; omitted → null)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rfisYes
unitsYes
schemaYes
sheetsYesScale provenance per sheet — how each scale was set
totalsYes
markupsYes
by_labelYes
by_sheetYesBASE per-sheet subtotals — multiplier NOT applied, no waste, no materials
materialsYesProject-wide buy list — condition rows summed by (name, unit)
conditionsYesconditionTotals rows: gross + *_net quantities AND the computed materials buy list
roll_goodsYesRoll-goods order rows (#136) — order_lf / rolls / order_qty per roll-goods condition, ×N applied; empty when no condition carries a roll_setup (always the case for a headless session today)
project_nameYes
shape_labelsYes
display_unitsYes
generated_withYes
condition_columnsYes
proposed_condition_editsNoPending condition-edit proposals (#365) — the rows above print the CURRENT knobs; each entry here carries the proposed values beside them. Present only when any are pending, so a proposal-free report is byte-identical

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.21
    • addedOutput schema / properties / proposed_condition_edits
      Added value: +{
      +  "description": "Pending condition-edit proposals (#365) — the rows above print the CURRENT knobs; each entry here carries the proposed values beside them. Present only when any are pending, so a proposal-free report is byte-identical",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "condition": {
      +        "type": "string"
      +      },
      +      "condition_id": {
      +        "type": "string"
      +      },
      +      "current": {
      +        "additionalProperties": true,
      +        "description": "The condition's knobs as they stand — what every total above is computed from",
      +        "properties": {
      +          "finish_tag": {
      +            "type": "string"
      +          },
      +          "height_ft": {
      +            "type": "number"
      +          },
      +          "multiplier": {
      +            "type": "number"
      +          },
      +          "roll_setup": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "properties": {},
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "waste_pct": {
      +            "type": "number"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "proposal_id": {
      +        "type": "string"
      +      },
      +      "proposed": {
      +        "additionalProperties": true,
      +        "description": "Only the fields that would change",
      +        "properties": {
      +          "finish_tag": {
      +            "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/finish_tag"
      +          },
      +          "height_ft": {
      +            "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/height_ft"
      +          },
      +          "multiplier": {
      +            "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/multiplier"
      +          },
      +          "roll_setup": {
      +            "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/roll_setup"
      +          },
      +          "waste_pct": {
      +            "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/waste_pct"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "proposed_at": {
      +        "type": "string"
      +      },
      +      "rationale": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "proposal_id",
      +      "condition",
      +      "condition_id",
      +      "current",
      +      "proposed",
      +      "rationale",
      +      "proposed_at"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  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. Changed2 schema fields changedv0.1.14
    • changedOutput schema / properties / conditions / items / properties / materials / items / properties / basis / enum
      Previous value: -[
      -  "area",
      -  "linear",
      -  "count"
      -]New value: +[
      +  "area",
      +  "linear",
      +  "count",
      +  "seam_lf"
      +]
    • changedOutput schema / properties / conditions / items / properties / materials / items / properties / basis_qty / description
      Previous value: -"The condition total this row divides (SF, LF, or EA — multiplier applied, waste not)"New value: +"The condition total this row divides (SF, LF, EA, or figured seam LF — multiplier applied, waste not)"
  4. Changed3 schema fields changedv0.1.9
    • addedInput schema / properties / project_name
      Added value: +{
      +  "description": "Label for the document's project_name field (a headless session has no project of its own; omitted → null)",
      +  "type": "string"
      +}
    • addedOutput schema / properties / roll_goods
      Added value: +{
      +  "description": "Roll-goods order rows (#136) — order_lf / rolls / order_qty per roll-goods condition, ×N applied; empty when no condition carries a roll_setup (always the case for a headless session today)",
      +  "items": {
      +    "additionalProperties": {},
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "schema",
      -  "project_name",
      -  "generated_with",
      -  "sheets",
      -  "conditions",
      -  "by_sheet",
      -  "totals",
      -  "materials",
      -  "markups",
      -  "rfis",
      -  "condition_columns",
      -  "shape_labels",
      -  "by_label",
      -  "units",
      -  "display_units"
      -]New value: +[
      +  "schema",
      +  "project_name",
      +  "generated_with",
      +  "sheets",
      +  "conditions",
      +  "by_sheet",
      +  "totals",
      +  "materials",
      +  "markups",
      +  "rfis",
      +  "condition_columns",
      +  "shape_labels",
      +  "by_label",
      +  "units",
      +  "display_units",
      +  "roll_goods"
      +]
  5. Addedv0.1.8

TDQS

A4.6/5.0
Behavior4/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 well: it describes what is computed, what is returned inline, and that passing path writes the document to disk. It omits practical traits such as output size/limits and does not explicitly label the operation as read-only against project state, but the mutation side effect (file write) is disclosed.

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?

Front-loaded with the resource identity, then contents, then sibling contrast, then workflow pairing, then return behavior. It is dense and long, and the 'A report alone is HALF the deliverable' framing is editorial, but nearly every sentence carries routing or payload information.

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?

An output schema exists so return values need not be spelled out, yet the description still summarizes the document's shape. Combined with explicit sibling contrasts, workflow pairing, and file-write behavior, nothing an agent needs to call this correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: 'Returned inline; pass path to also write it to disk as JSON' clarifies the inline-vs-file duality that the schema's path description does not state on its own. project_name and overwrite semantics are left to the schema.

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/resource ('the computed Report document — "opentakeoff.report.v1"') and enumerates the payload contents (quantities with waste/multiplier, buy list, roll-up, base subtotals, scale provenance, annotations). It also explicitly distinguishes itself from two named siblings, export_takeoff and takeoff_summary, so an agent can route without opening schemas.

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?

Gives an explicit decision rule: 'when the numbers are leaving for pricing, consume this,' contrasted against export_takeoff (raw config rows) and takeoff_summary (materials stripped). It further prescribes a companion workflow ('pair it with export_marked_pdf'), which is actionable routing guidance beyond mere context.

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