Skip to main content
Glama

design_plan_hierarchy

Splits dense DesignPlans into connected multi-sheet hierarchies, derives inter-sheet ports, and emits top-sheet placement/TOC operations for application before execution.

Instructions

Propose a multi-sheet hierarchy for a dense DesignPlan.

Stage 6 of the autonomous flow (schematic emit, reference/autonomy-roadmap.md): a plan past ~20 parts stops fitting one readable sheet and dense single sheets are the known short-risk regime. This tool partitions the parts by signal connectivity (min-cut, zones kept atomic), names each child sheet from its dominant zone role, derives the inter-sheet ports from the signal nets the cut severs (power/ground rails are continuous through power ports and never become sheet entries), and emits the top-sheet op list in the exact parameter shapes of sch_place_sheet_symbol / sch_place_sheet_entry / sch_generate_toc. Apply the result to the plan with design_apply_hierarchy before design_execute_plan. Deterministic; pure Python, no Altium.

Args: plan_json: DesignPlan as a JSON string or dict. max_parts_per_sheet: Split threshold (default 20). At or below it the plan stays single-sheet (split=False).

Returns: {"ok": True, "split": bool, "top_sheet": str, "sheets": [{name, refdes, zones, part_count}], "ports": [{net, from_sheet, to_sheet, io_type}], "top_sheet_ops": [{tool, params}], "cut_nets": int} (op coordinates are MILS) or {"ok": False, "reason": "..."}.

Input Schema

NameRequiredDescriptionDefault
plan_jsonYes
max_parts_per_sheetNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/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 so: it states the operation is a pure-Python, deterministic, no-Altium proposal (i.e. non-mutating), discloses the algorithm's invariants (zones kept atomic, power/ground rails continuous through power ports and never sheet entries), and notes op coordinates are in MILS. It also gives the failure 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with a one-line purpose, then stage context, algorithm, workflow ordering, and structured Args/Returns blocks — every section is scannable and the critical routing sentence (apply before execute) is not buried. Length is justified by the number of non-obvious invariants it discloses.

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 2-parameter, non-mutating planning tool with no annotations, the description covers trigger, algorithm, determinism, output fields, units, failure mode, and the required follow-up call. The Returns block largely restates the existing output schema, but that redundancy does no harm and nothing an agent needs to call it 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 description coverage is 0%, so the description must compensate and largely does: it explains plan_json accepts a JSON string or dict, and that max_parts_per_sheet is a split threshold defaulting to 20 with the exact at-or-below behavior (split=False). It never states what fields a DesignPlan must contain or what happens with a malformed plan.

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 first sentence names a specific verb and resource ("Propose a multi-sheet hierarchy for a dense DesignPlan") and the body specifies the mechanism: min-cut partitioning by signal connectivity, child sheet naming from dominant zone role, and inter-sheet port derivation. It clearly positions itself as a non-mutating proposal step whose output feeds design_apply_hierarchy, which separates it from the execute/apply siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It gives a concrete trigger condition (plans past ~20 parts, dense single sheets being the known short-risk regime) and an explicit downstream workflow: apply with design_apply_hierarchy before design_execute_plan. It does not distinguish itself from the closely named sibling design_suggest_partition or design_preview_plan, so an agent must still infer which of the two proposal tools to pick.

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