Skip to main content
Glama

derive_base

Derive wall base linear quantities from committed room perimeters by deducting stated door openings and committing one net base shape per floor area under a target finish condition.

Instructions

Mint the wall base from committed rooms (#148) — the estimator's most mechanical derivation: base LF = room perimeter − stated door openings. For every floor_area shape of source_condition, commits ONE linear shape under condition (e.g. 'RB-1') tracing that room's boundary, quantified NET of the openings you state per room. The openings are YOUR claim to make — look at the doors with view_sheet, state {shape_id, lf} per room (repeat a shape_id to stack openings); the tool never guesses, and your claim is recorded on origin.derived (from_shape_id, gross_lf, openings_lf). The output geometry remains the whole perimeter: deducted openings are numerical, not visible gaps. For a drawing of the actual installed base, use measure_line on the physical runs after checking door jambs, alcoves and open finish splits. All-or-nothing: an unknown shape_id, a negative lf, or openings meeting a room's whole perimeter refuses the call before anything commits. The whole derivation is ONE undo step. Deriving onto the source condition is refused — base lands on its own tag.

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": {
      "source_condition": "<source_condition>",
      "condition": "<condition>"
    },
    "name": "derive_base"
  }
}

Input Schema

NameRequiredDescriptionDefault
openingsNoStated openings per room — omit for gross perimeters
conditionYesFinish tag the base commits under (minted on first use), e.g. 'RB-1'
source_conditionYesFinish tag whose floor_area rooms the base derives from, e.g. 'CPT-1'

Output Schema

NameRequiredDescriptionDefault
noteYes
roomsYes
total_lfYesSum of net_lf across rooms
committedYes
conditionYesThe tag the base committed under
source_conditionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.31
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / openings / items / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / committed / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / committed / minimum
      Added value: +-9007199254740991
  2. Addedv0.1.9

TDQS

A4.8/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 behavioral burden and does so thoroughly: commits ONE linear shape per floor_area shape, records the claim on origin.derived (from_shape_id, gross_lf, openings_lf), keeps output geometry as the whole perimeter with numerical-only deductions, is all-or-nothing, and constitutes ONE undo step.

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 definition is dense but front-loaded, leading with the verb and formula before conditions. Every sentence carries operational information, though the parenthetical issue reference and 'estimator's most mechanical derivation' add minor flavor rather than actionable guidance.

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 mutation-heavy derivation tool with three parameters and an output schema, the description covers inputs, atomic failure modes, undo behavior, origin recording, and the geometric caveat that openings are numerical rather than visual gaps. Nothing critical is missing for an agent to call it correctly.

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. The description adds meaningful semantics beyond the schema: openings are 'YOUR claim to make', you state {shape_id, lf} per room, and repeating a shape_id stacks openings. It reinforces that the tool never guesses, which matters for correct invocation.

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 precise verb and resource ('Mint the wall base from committed rooms') and gives the exact derivation formula: base LF = room perimeter − stated door openings. It clearly distinguishes itself from the sibling measure_line for physical installed runs, so an agent can tell them apart 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative (measure_line on physical runs) and the condition that selects it (drawing of the actual installed base, after checking door jambs, alcoves and open finish splits). Also documents refusal conditions: unknown shape_id, negative lf, openings meeting a room's whole perimeter, and deriving onto the source condition.

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