Skip to main content
Glama

BOM Extract

bom_extract
Read-only

Extracts a bill of materials from an assembly, grouping part names by source component and optionally checking purchased parts for stock and orderability.

Instructions

Walk an assembly and return [{part, count, total_volume_mm3, total_mass_kg?}, ...] grouped by source (component file + object), NOT the bare object name, so two distinct components both named "Box" don't collapse into one row. density (kg/mm³) is optional.

recursive (default True): descend into linked subassemblies (App::Part) so the BOM flattens to leaf parts. False counts each subassembly as one line.

orderable (default False): opt in to the BUYABILITY view — is every purchased line on this BOM a part that actually exists off the shelf? The default return is unchanged — a bare list — because everything downstream consumes it. With orderable=True you instead get a dict:

rows the same BOM rows, each also carrying designation / standard / part_class plus the catalog verdict (stocked, catalog_code, catalog) consumables purchased parts that are NOT modelled objects and would otherwise never reach a BOM — today the O-ring an oring_groove was cut for, counted across every part that calls for it undesignated purchased rows a buyer cannot order from (no designation) not_stocked rows naming a part nobody stocks, each with a reason and the nearest stocked alternatives designation the full designation_check verdict stocked_count how many purchased lines resolved to a stocked item ok False when anything purchased is undesignated OR not stocked

check_stock=False designates without checking availability. A design built out of fasteners that do not exist is the failure this catches, and the offending rows stay IN the list rather than being quietly dropped. Availability is a curated snapshot of a market (captured, market), not physics.

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": {
      "assembly": "<assembly>"
    },
    "name": "bom_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
densityNo
assemblyYes
orderableNo
recursiveNo
workspaceNoRun this call in this named workspace
check_stockNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Behavior beyond the annotations is disclosed in depth: the return type itself changes when orderable=True (bare list vs. a seven-key dict), failure semantics are stated ('ok: False when anything purchased is undesignated OR not stocked'), and the crucial non-obvious rule is spelled out – 'the offending rows stay IN the list rather than being quietly dropped'. It even bounds the reliability of the underlying data: 'Availability is a curated snapshot of a market ..., not physics.'

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-loading is excellent – the return shape and grouping rule come first, parameter behavior second, the alternate return contract last. The indented key-by-key breakdown of the orderable dict is long but each entry (consumables, undesignated, not_stocked, stocked_count, ok) carries distinct decision-relevant meaning. It is borderline verbose for a 10%-weight dimension, but almost nothing is filler prose.

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 six-parameter analysis tool with a real output schema, this is effectively complete: it states the default return, the opt-in alternate return, the meaning of the ok flag, the non-dropping failure policy, and the domain caveat on stock data. An agent can decide whether to set orderable and know how to interpret a false ok without any further documentation.

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 only 17%, so the description carries the load, and it does so for four of six parameters: density (units kg/mm³, optional), recursive (with defaults and downstream effect), orderable (with the full alternate return contract), and check_stock (what disabling it skips). The required 'assembly' parameter and the 'workspace' parameter are left to the schema, the latter being the only property with its own description.

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 description opens with a specific verb-and-resource pairing ('Walk an assembly and return [{part, count, total_volume_mm3, total_mass_kg?}, ...]') and immediately pins down the grouping semantics: 'grouped by source (component file + object), NOT the bare object name'. That negative clause alone separates it from a naive object-name rollup and tells an agent exactly what shape of answer to expect before reading the 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?

Usage at the option level is explicit: 'recursive (default True): descend into linked subassemblies ... False counts each subassembly as one line' and 'orderable (default False): opt in to the BUYABILITY view'. The check_stock=False case is also contextualized ('designates without checking availability'). What is missing is any explicit routing versus siblings like list_assembly_parts, mass_properties, or where_used, so the agent gets strong when-to-use detail but no when-not-to-use.

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