Skip to main content
Glama

derive_base

Calculate wall base lengths for takeoff by deducting specified door openings from room perimeters, then commit as linear shapes under a finish tag.

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.

Input Schema

TableJSON 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

TableJSON 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. 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 burden and delivers: all-or-nothing refusal on unknown shape_id, negative lf, or openings meeting a full perimeter; the whole derivation is one undo step; deriving onto the source condition is refused; deducted openings are numerical not visible geometry. It also states where the claim is recorded (origin.derived).

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 purpose and formula before constraints, and nearly every sentence earns its place by adding a rule or failure mode. It is dense and long, but for a tool with this many invariants the length is largely justified rather than padding.

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?

Given an output schema exists, return-value explanation is not required, and the description covers everything else an agent needs: the derivation model, refusal conditions, undo granularity, and the condition-tag constraint. Nothing material for correct invocation 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 genuine meaning beyond the schema: openings are the caller's own claim and are recorded, shape_id can be repeated to stack openings, and omitting openings yields gross perimeters. The stacking and claim-recording semantics are not obvious from the schema alone.

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 — minting a wall base from committed rooms — and gives the exact formula (base LF = room perimeter − stated door openings). It also distinguishes itself from siblings by scoping to floor_area shapes of source_condition and naming measure_line for the alternative 'installed base' case.

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?

Explicit when-to-use (derive base from committed rooms of source_condition), when-to-use-the-other (drawing of actual installed base → measure_line on physical runs), and the prerequisite workflow (look at doors with view_sheet, state openings per room). Alternatives and conditions are spelled out.

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