Skip to main content
Glama

export_report

Exports a computed construction takeoff report as JSON for pricing, including per-condition quantities, material buy lists, subtotals, scale provenance, and annotations.

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "export_report"
  }
}

Input 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

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. Changed32 schema fields changedv0.1.31
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / by_label / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / by_sheet / items / additionalProperties
      Previous value: -trueNew value: +{}
    • addedOutput schema / properties / by_sheet / items / properties / rows / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / condition_columns / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / conditions / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / conditions / items / properties / materials / items / additionalProperties
      Previous value: -trueNew value: +{}
    • addedOutput schema / properties / conditions / items / properties / shape_count / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / conditions / items / properties / shape_count / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / markups / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / materials / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / proposed_condition_edits / items / properties / current / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / proposed_condition_edits / items / properties / current / properties / roll_setup / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / proposed_condition_edits / items / properties / proposed / additionalProperties
      Previous value: -trueNew value: +{}
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / drop_ft / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/drop_ft"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / drop_ft / type
      Added value: +"number"
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / finish_tag / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/finish_tag"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / finish_tag / type
      Added value: +"string"
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / height_ft / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/height_ft"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / height_ft / type
      Added value: +"number"
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / multiplier / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/multiplier"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / multiplier / type
      Added value: +"number"
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / rise_ft / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/rise_ft"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / rise_ft / type
      Added value: +"number"
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / roll_setup / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/roll_setup"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / roll_setup / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / waste_pct / $ref
      Removed value: -"#/properties/proposed_condition_edits/items/properties/current/properties/waste_pct"
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / waste_pct / type
      Added value: +"number"
    • addedOutput schema / properties / rfis / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / roll_goods / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / sheets / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / totals / additionalProperties
      Previous value: -trueNew value: +{}
  2. Changed4 schema fields changedv0.1.25
    • addedOutput schema / properties / proposed_condition_edits / items / properties / current / properties / drop_ft
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / proposed_condition_edits / items / properties / current / properties / rise_ft
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / drop_ft
      Added value: +{
      +  "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/drop_ft"
      +}
    • addedOutput schema / properties / proposed_condition_edits / items / properties / proposed / properties / rise_ft
      Added value: +{
      +  "$ref": "#/properties/proposed_condition_edits/items/properties/current/properties/rise_ft"
      +}
  3. 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"
      +}
  4. 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"
      +}
  5. 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)"
  6. 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"
      +]
  7. 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 present, the description carries the full burden and does most of it: it discloses that the result is returned inline and that passing path additionally writes JSON to disk, so the agent knows the call has an optional filesystem side effect. It stops short of stating that the operation is otherwise read-only/non-mutating and says nothing about overwrite risk at the description level (that lives in the schema), leaving a small gap for a no-annotation tool.

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 schema identity and payload contents, and the sibling contrast is placed before the recommendation so the routing decision lands cleanly. It is long and dense with a couple of near-duplicative clauses, but essentially every sentence carries decision-relevant information, so the length is mostly earned.

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 an export tool with an output schema, three optional parameters, and no annotations, the description supplies the missing behavioral layer: what the document contains, where it goes, and what companion artifact the workflow requires. Nothing an agent needs in order to select and invoke it correctly is absent.

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 earns more by clarifying the relationship between the return value and path ("returned inline; pass path to also write it to disk"), which tells the agent that path is additive rather than a redirection. It does not elaborate on overwrite or project_name semantics, which remain schema-only.

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 specific verb+resource+format: the computed Report document, schema "opentakeoff.report.v1", and enumerates exactly what it contains (net/gross quantities, BUY LIST, base subtotals, scale provenance, annotations). It explicitly names what it is not (export_takeoff is the raw canvas payload, takeoff_summary strips materials), so an agent can distinguish it from 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?

Gives an explicit decision rule: "when the numbers are leaving for pricing, consume this," and contrasts both alternatives by what they omit. It goes further and states a co-requisite workflow (pair with export_marked_pdf because a takeoff is reviewed on marked drawings), which is the kind of routing guidance an agent normally has to infer.

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