Skip to main content
Glama

Build product system (bill of quantities)

lca_compose_assembly

Build a product system as a bill of quantities of database processes. Each member's amount is sent in one call. Structure only; no LCIA runs. The assembled product is the functional unit; each member is linked to its full upstream when assessed, so the total is a full-upstream figure for the declared scope, with a per-material breakdown. Takes inputs (flat) or stages (a DAG of life-cycle stages), not both. The system is validated against the database; if valid it is saved and system_ref is returned for lca_run_assessment. If invalid, the response lists errors[], missing_required[] and warnings[] and nothing is saved; a corrected call carries the complete system. dry_run: true validates without saving. A tool error, not an invalid result, means the engine is unavailable. Members are p<N> refs; UUIDs are not accepted. lca_compose_linked builds explicit supply edges instead. The product_system_authoring skill (load_skill) documents build order and common failures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoSystem boundary. 'cradle_to_gate' (default) = materials through manufacture. 'cradle_to_grave' = ALSO include end-of-life (add disposal/treatment process leaves). 'end_of_life' = treatment of a product at end of life only; the functional unit is the treated product, e.g. '1 kg of end-of-life PV module, treated'. A cradle-to-grave system spans life-cycle phases — prefer `stages` over a flat `inputs` list so each phase gets its own subtotal.
titleYesName for the assembly, e.g. 'Wooden house assembly, 100 m²'.
engineNoName of the engine database, as `lca_get(kind='engines')` lists it (case-insensitive). Omitted: this connection's default engine.
inputsNoFLAT bill of quantities: one entry per member. Use for a single cradle-to-gate group of parts with no phases to separate. If the system spans life-cycle phases (materials/transport/use/end-of-life) or is a comparison, prefer `stages` instead — same total, per-phase subtotals. Set this OR `stages`, not both.
stagesNoMULTI-STAGE DAG (preferred for cradle-to-grave, multi-phase, or comparison systems — same total as a flat list, but each phase gets its own subtotal): named stages, each consuming process leaves and/or other stages. Declare stages + what each consumes; DO NOT wire links or name the final product — the compiler derives the edges and the final (sink) stage. Cycles are rejected. Set this OR `inputs`, not both.
dry_runNoWhen true, validate ONLY — return the envelope without persisting (and without a confirmation prompt). Default false: a valid system is built and its s-ref returned in this one call.
workspaceYesName of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work.
output_nameYesName for the assembled product, e.g. 'Wooden house, 100 m²'.
output_unitNoDeclared unit for the assembled product (e.g. 'house', 'm2', 'tonne'). Used as the functional-unit unit in the scope editor.
target_amountNoFunctional-unit amount (default 1.0).
temporal_scopeNoTemporal scope of the system (e.g. '2020-2024', 'Reference year 2022').
cutoff_criteriaNoExplicit cutoff criteria (e.g. 'Mass cutoff 1%; energy cutoff 1%'). Overrides the scope-derived default.
geographical_scopeNoExplicit geographical scope (e.g. 'Switzerland'). Overrides location codes derived from member processes.
functional_unit_descriptionNoFree-text description of the functional unit (e.g. 'One house, 160 m², 50-year service life').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / workspace / description
      Previous value: -"Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace."New value: +"Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work."
  2. Changed5 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / inputs / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / stages / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / stages / items / properties / inputs / items / additionalProperties
      Removed value: -false
  3. Changed2 schema fields changed
    • changedInput schema / properties / scope / description
      Previous value: -"System boundary. 'cradle_to_gate' (default) = materials through manufacture. 'cradle_to_grave' = ALSO include end-of-life (add disposal/treatment process leaves). A cradle-to-grave system spans life-cycle phases — prefer `stages` over a flat `inputs` list so each phase gets its own subtotal."New value: +"System boundary. 'cradle_to_gate' (default) = materials through manufacture. 'cradle_to_grave' = ALSO include end-of-life (add disposal/treatment process leaves). 'end_of_life' = treatment of a product at end of life only; the functional unit is the treated product, e.g. '1 kg of end-of-life PV module, treated'. A cradle-to-grave system spans life-cycle phases — prefer `stages` over a flat `inputs` list so each phase gets its own subtotal."
    • changedInput schema / properties / scope / enum
      Previous value: -[
      -  "cradle_to_gate",
      -  "cradle_to_grave"
      -]New value: +[
      +  "cradle_to_gate",
      +  "cradle_to_grave",
      +  "end_of_life"
      +]
  4. Changed3 schema fields changed
    • addedInput schema / properties / engine
      Added value: +{
      +  "description": "Name of the engine database, as `lca_get(kind='engines')` lists it (case-insensitive). Omitted: this connection's default engine.",
      +  "maxLength": 255,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace.",
      +  "maxLength": 255,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "title",
      -  "output_name"
      -]New value: +[
      +  "workspace",
      +  "title",
      +  "output_name"
      +]
  5. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the write/non-idempotent/non-destructive profile, but the description adds substantial context the annotations cannot: validation against the database before saving, the errors[]/missing_required[]/warnings[] failure contract with 'nothing is saved', the requirement that a corrected call carry the complete system, and the distinction between a tool error (engine unavailable) and an invalid result. Not covered: permissions/auth prerequisites for writing into a workspace.

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 the core action, then validation and failure semantics, then sibling routing. Every sentence is functional, though the block is dense and the member-ref/UUID rule could be tightened.

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 14-parameter, no-output-schema, non-idempotent mutation tool, the description covers construction (inputs vs stages), validation/failure contract, the returned system_ref, dry_run, and sign/unit conventions. Nothing an agent needs in order 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already carries the per-parameter meaning; the description correctly gets baseline 3. It adds a small amount of non-duplicative constraint ('Members are p<N> refs; UUIDs are not accepted', and the inputs-vs-stages exclusivity), but most parameter guidance is repeated from the schema.

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 gives a specific verb and resource: 'Build a product system as a bill of quantities of database processes.' It explicitly names the sibling it is not (lca_compose_linked builds explicit supply edges instead), so an agent can route without opening schemas.

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 routing rules: inputs OR stages but not both, with a stated preference for stages when the system spans life-cycle phases; dry_run for validate-only; and lca_run_assessment named as the consumer of system_ref. It even points to the product_system_authoring skill for build order.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources