Skip to main content
Glama

design_generate_bom

Generate a consolidated bill of materials from a design plan's parts in one call, grouping parts into orderable lines and flagging entries that still need a manufacturer part number.

Instructions

Derive the bill of materials from a plan's parts in one call.

Every design needs a BOM, and it is mechanical to build from parts you already authored -- this rolls them up so you do not hand-group refdes (redundant with the parts, and easy to miscount). Parts with an mpn consolidate by (manufacturer, mpn) -- one orderable line each; parts without an mpn consolidate by (lib_ref, value, footprint) -- so every 100 nF 0402 cap is one line. Deterministic (natural-sorted, R2 before R10). Pure Python, no Altium.

lines_without_mpn flags lines that still need a manufacturer part number before the BOM is orderable -- the gaps to fill.

Args: plan_json: the DesignPlan as a JSON string or dict. set_on_plan: when True (default), the returned plan carries the generated BOM in its bom field, ready for design_execute_plan; the parts are unchanged.

Returns: {ok, bom: [{refdes_list, manufacturer, mpn, description, qty}], summary: {line_count, total_parts, lines_without_mpn}, plan?}.

Input Schema

NameRequiredDescriptionDefault
plan_jsonYes
set_on_planNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does so: it declares the tool pure/deterministic, natural-sorted ordering (R2 before R10), no Altium involvement, and that set_on_plan only attaches a bom field while leaving parts unchanged. Missing only error behavior on malformed plans, which is a minor gap for a pure function.

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?

Purpose is front-loaded in the first sentence, and the Args/Returns blocks make it scannable. A few phrases are conversational filler ('every 100 nF 0402 cap is one line', 'easy to miscount'), which cost some density but also carry real semantic information about grouping.

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?

Even though an output schema exists and would have excused omitting return values, the description documents the exact response shape, including the lines_without_mpn flag meaning and the optional plan field. For a 2-parameter derived-data tool this leaves nothing material unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 does: plan_json is defined as 'the DesignPlan as a JSON string or dict' (matching the anyOf), and set_on_plan's True default and returned-plan side effect are spelled out. The consolidation keys tied to mpn/no-mpn parts also clarify what the input needs to contain.

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 ('Derive the bill of materials from a plan's parts') and immediately scopes the input as a DesignPlan rather than a live project. The 'Pure Python, no Altium' line implicitly separates it from project-backed BOM tools like proj_get_bom or proj_export_bom_html, so an agent can route correctly without opening a schema.

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?

Explains the conditions well: use it when parts already exist on a plan and you want an orderable rollup, and points at design_execute_plan as the downstream consumer of the returned plan. It stops short of naming an explicit exclusion (e.g. 'use proj_get_bom for an existing Altium project'), leaving that inference to the agent.

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