Skip to main content
Glama

design_apply_hierarchy

Rewrite a DesignPlan onto the sheets a hierarchy proposes, re-homing every part and its zones to produce a new multi-sheet plan ready for validation and execution.

Instructions

Rewrite a DesignPlan onto the sheets a hierarchy proposes.

Stage 6 of the autonomous flow (schematic emit, reference/autonomy-roadmap.md), the second half of the hierarchy step: take the result of design_plan_hierarchy and produce a NEW plan with sheets = [top sheet, *child sheets], every part's sheet re-homed per the hierarchy, and every zone moved with its parts (part-less zones park on the top sheet). The input plan is never mutated; a non-split hierarchy returns the plan unchanged. Feed the returned plan to design_validate_plan and then design_execute_plan; emit the hierarchy's top_sheet_ops separately to draw the top sheet. Pure Python.

Args: plan_json: DesignPlan as a JSON string or dict. hierarchy: The dict returned by design_plan_hierarchy.

Returns: {"ok": True, "plan": {...rewritten DesignPlan...}, "sheets": [names], "summary": "..."} or {"ok": False, "reason": "..."} on a malformed plan or hierarchy.

Input Schema

NameRequiredDescriptionDefault
hierarchyYes
plan_jsonYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

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 does well: discloses the input is never mutated, a non-split hierarchy returns the plan unchanged, part-less zones park on the top sheet, and it's pure Python. It also documents the failure result shape (ok:False, reason).

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-loads the core action in the first sentence, then the pipeline. The stage/roadmap references add context but are slightly verbose for an agent deciding how to call it; still every sentence is informative.

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?

Covers behavior, params, return shape, and error case even though an output schema exists. Nothing an agent needs in order to call it correctly or sequence it in the flow 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 description coverage is 0%, so the description must compensate and largely does: plan_json is 'DesignPlan as JSON string or dict' and hierarchy is 'the dict returned by design_plan_hierarchy'. It could state more about expected plan structure but the semantics of both params are clear.

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 ('Rewrite a DesignPlan') and resource ('onto the sheets a hierarchy proposes'), and explicitly positions itself as the second half of the hierarchy step consuming design_plan_hierarchy output. An agent can distinguish it from design_plan_hierarchy and design_execute_plan 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 pipeline: take the result of design_plan_hierarchy, feed the returned plan to design_validate_plan then design_execute_plan, and emit top_sheet_ops separately. It names prerequisites and next steps with specific siblings.

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

Deploy Server

Other Tools