Skip to main content
Glama

Edit product system

lca_edit_assembly
Destructive

Patch a saved composed (bill-of-materials) system (s<N>). Ops: replace_provider (swap a member everywhere it is used), set_target_amount (rescale the functional unit), set_title (rename), add_member / remove_member, set_member_amount (rescale an existing member), add_stage / remove_stage (grow or shrink the stage DAG; it must stay acyclic with one sink), set_boundary (declared_phases / excluded_phases; nothing goes stale). mode (default edit): edit patches in place, keeping the same s<N>; fork derives a new s<M>. A mirror is forked when content changes, with a warning. Each member is linked cradle-to-gate independently when assessed, so swaps and additions bring their own background; only unit compatibility is checked, so a swap can change a dataset's geography, technology and reference year. Members are p<N> refs; UUIDs are not accepted. Linked and single-process systems are edited with lca_edit_linked. The returned ref can be assessed with lca_run_assessment.

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": {
      "workspace": "<workspace>",
      "ref": "<ref>",
      "ops": "<ops>"
    },
    "name": "lca_edit_assembly"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYesOrdered list of edits to apply in one call.
refYesSaved product-system ref `s<N>` to patch.
modeNo`edit` (default) → edit the system IN PLACE, appending a new content version and keeping the same `s<N>` (self-contained systems; a drift-tracked mirror auto-forks to a new `s<M>` with a warning, since it can't be mutated in place). `fork` → always derive a NEW `s<M>`, leaving the baseline `s<N>` untouched.edit
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.
base_version_seqNoREQUIRED here: the system's current content `version_seq`, as `lca_get s<N>` reports it — the version you computed this edit against. Rejected (409) if the system has moved on since, and nothing is changed. Re-read the system between edits: a successful in-place edit advances the version. (Kept optional in the schema so an omission gets the backend's instructive 422 rather than a bare validation error.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / ops / items / properties / declared_phases / description
      Previous value: -"set_boundary: the phases the system covers; replaces the current list ([] clears it). Omit to keep it. Phases: production (materials and manufacture), distribution (transport to site, installation), use (operation, maintenance, replacement, operational energy and water), end_of_life (dismantling, waste treatment, disposal), beyond_boundary (EN 15804 module D: credits and loads of reuse, recycling and recovery)."New value: +"set_boundary: the phases the system covers; replaces the current list ([] clears it). Omit to keep it. Phases: production (materials and manufacture), distribution (transport to site, installation), use (operation, maintenance, replacement, operational energy and water), end_of_life (dismantling, waste treatment, disposal), beyond_boundary (beyond end of life: benefits and loads of reuse, recycling and recovery, shown beside the total — EN 15804 module D)."
    • changedInput schema / properties / ops / items / properties / inputs / items / properties / module / description
      Previous value: -"add_stage input, process leaf only (never a stage_ref: that stage carries its own tag): this leaf's own phase tag, overriding the new stage's. EN 15804 module (A1-A3 product, A4-A5 transport/installation, B1-B7 use, C1-C4 end of life, D beyond the boundary: reuse, recycling, recovery); sets its phase, must match `phase`. A1-A3 for aggregated data."New value: +"add_stage input, process leaf only (never a stage_ref: that stage carries its own tag): this leaf's own phase tag, overriding the new stage's. EN 15804 module (A1-A3 product, A4-A5 transport/installation, B1-B7 use, C1-C4 end of life, D beyond end of life: reuse, recycling, recovery), only when the study follows EN 15804; sets its phase, must match `phase`. A1-A3 for aggregated data."
    • changedInput schema / properties / ops / items / properties / inputs / items / properties / phase / description
      Previous value: -"add_stage input, process leaf only (never a stage_ref: that stage carries its own tag): this leaf's own phase tag, overriding the new stage's. Phase: production (materials, manufacture), distribution (transport, installation), use (operation, upkeep, energy/water), end_of_life (dismantling, waste, disposal), beyond_boundary (module D: credits and loads of reuse, recycling, recovery; shown beside the total, not in it); omit = untagged."New value: +"add_stage input, process leaf only (never a stage_ref: that stage carries its own tag): this leaf's own phase tag, overriding the new stage's. Phase: production (materials, manufacture), distribution (transport, installation), use (operation, upkeep, energy/water), end_of_life (dismantling, waste, disposal), beyond_boundary (beyond end of life: reuse, recycling, recovery; shown beside the total, not in it); omit = untagged."
    • changedInput schema / properties / ops / items / properties / module / description
      Previous value: -"add_member: the new member's phase tag. add_stage: the new stage's (what its process leaves belong to unless a leaf carries its own). Not used by any other op: an existing part keeps its tag, and replace_provider moves it to the new member (dropped, with a warning, when that member was already in the system). EN 15804 module (A1-A3 product, A4-A5 transport/installation, B1-B7 use, C1-C4 end of life, D beyond the boundary: reuse, recycling, recovery); sets its phase, must match `phase`. A1-A3 for aggregated data."New value: +"add_member: the new member's phase tag. add_stage: the new stage's (what its process leaves belong to unless a leaf carries its own). Not used by any other op: an existing part keeps its tag, and replace_provider moves it to the new member (dropped, with a warning, when that member was already in the system). EN 15804 module (A1-A3 product, A4-A5 transport/installation, B1-B7 use, C1-C4 end of life, D beyond end of life: reuse, recycling, recovery), only when the study follows EN 15804; sets its phase, must match `phase`. A1-A3 for aggregated data."
    • changedInput schema / properties / ops / items / properties / phase / description
      Previous value: -"add_member: the new member's phase tag. add_stage: the new stage's (what its process leaves belong to unless a leaf carries its own). Not used by any other op: an existing part keeps its tag, and replace_provider moves it to the new member (dropped, with a warning, when that member was already in the system). Phase: production (materials, manufacture), distribution (transport, installation), use (operation, upkeep, energy/water), end_of_life (dismantling, waste, disposal), beyond_boundary (module D: credits and loads of reuse, recycling, recovery; shown beside the total, not in it); omit = untagged."New value: +"add_member: the new member's phase tag. add_stage: the new stage's (what its process leaves belong to unless a leaf carries its own). Not used by any other op: an existing part keeps its tag, and replace_provider moves it to the new member (dropped, with a warning, when that member was already in the system). Phase: production (materials, manufacture), distribution (transport, installation), use (operation, upkeep, energy/water), end_of_life (dismantling, waste, disposal), beyond_boundary (beyond end of life: reuse, recycling, recovery; shown beside the total, not in it); omit = untagged."
  2. Changed8 schema fields changed
    • addedInput schema / properties / ops / items / properties / declared_phases
      Added value: +{
      +  "description": "set_boundary: the phases the system covers; replaces the current list ([] clears it). Omit to keep it. Phases: production (materials and manufacture), distribution (transport to site, installation), use (operation, maintenance, replacement, operational energy and water), end_of_life (dismantling, waste treatment, disposal), beyond_boundary (EN 15804 module D: credits and loads of reuse, recycling and recovery).",
      +  "items": {
      +    "enum": [
      +      "production",
      +      "distribution",
      +      "use",
      +      "end_of_life",
      +      "beyond_boundary"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / ops / items / properties / excluded_phases
      Added value: +{
      +  "description": "set_boundary: phases deliberately left out, each with an optional reason; replaces the current list ([] clears it). Omit to keep it. A phase in neither list reads 'not declared', never 'excluded'.",
      +  "items": {
      +    "properties": {
      +      "phase": {
      +        "enum": [
      +          "production",
      +          "distribution",
      +          "use",
      +          "end_of_life",
      +          "beyond_boundary"
      +        ],
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "Why it is outside the boundary.",
      +        "maxLength": 300,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "phase"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedInput schema / properties / ops / items / properties / includes_use_phase
      Removed value: -{
      -  "description": "set_boundary: true = the bill includes use-phase items (operational energy, water, maintenance, replacements); false = the use phase is deliberately excluded. Omit to keep the current declaration.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / ops / items / properties / inputs / items / properties / module
      Added value: +{
      +  "description": "add_stage input, process leaf only (never a stage_ref: that stage carries its own tag): this leaf's own phase tag, overriding the new stage's. EN 15804 module (A1-A3 product, A4-A5 transport/installation, B1-B7 use, C1-C4 end of life, D beyond the boundary: reuse, recycling, recovery); sets its phase, must match `phase`. A1-A3 for aggregated data.",
      +  "enum": [
      +    "A1",
      +    "A2",
      +    "A3",
      +    "A1-A3",
      +    "A4",
      +    "A5",
      +    "B1",
      +    "B2",
      +    "B3",
      +    "B4",
      +    "B5",
      +    "B6",
      +    "B7",
      +    "C1",
      +    "C2",
      +    "C3",
      +    "C4",
      +    "D"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / ops / items / properties / inputs / items / properties / phase
      Added value: +{
      +  "description": "add_stage input, process leaf only (never a stage_ref: that stage carries its own tag): this leaf's own phase tag, overriding the new stage's. Phase: production (materials, manufacture), distribution (transport, installation), use (operation, upkeep, energy/water), end_of_life (dismantling, waste, disposal), beyond_boundary (module D: credits and loads of reuse, recycling, recovery; shown beside the total, not in it); omit = untagged.",
      +  "enum": [
      +    "production",
      +    "distribution",
      +    "use",
      +    "end_of_life",
      +    "beyond_boundary"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / ops / items / properties / module
      Added value: +{
      +  "description": "add_member: the new member's phase tag. add_stage: the new stage's (what its process leaves belong to unless a leaf carries its own). Not used by any other op: an existing part keeps its tag, and replace_provider moves it to the new member (dropped, with a warning, when that member was already in the system). EN 15804 module (A1-A3 product, A4-A5 transport/installation, B1-B7 use, C1-C4 end of life, D beyond the boundary: reuse, recycling, recovery); sets its phase, must match `phase`. A1-A3 for aggregated data.",
      +  "enum": [
      +    "A1",
      +    "A2",
      +    "A3",
      +    "A1-A3",
      +    "A4",
      +    "A5",
      +    "B1",
      +    "B2",
      +    "B3",
      +    "B4",
      +    "B5",
      +    "B6",
      +    "B7",
      +    "C1",
      +    "C2",
      +    "C3",
      +    "C4",
      +    "D"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / ops / items / properties / phase
      Added value: +{
      +  "description": "add_member: the new member's phase tag. add_stage: the new stage's (what its process leaves belong to unless a leaf carries its own). Not used by any other op: an existing part keeps its tag, and replace_provider moves it to the new member (dropped, with a warning, when that member was already in the system). Phase: production (materials, manufacture), distribution (transport, installation), use (operation, upkeep, energy/water), end_of_life (dismantling, waste, disposal), beyond_boundary (module D: credits and loads of reuse, recycling, recovery; shown beside the total, not in it); omit = untagged.",
      +  "enum": [
      +    "production",
      +    "distribution",
      +    "use",
      +    "end_of_life",
      +    "beyond_boundary"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / ops / items / properties / scope
      Removed value: -{
      -  "description": "set_boundary: the new declared system boundary; omit to keep the current one.",
      -  "enum": [
      -    "cradle_to_gate",
      -    "cradle_to_grave",
      -    "end_of_life"
      -  ],
      -  "type": "string"
      -}
  3. Changed3 schema fields changed
    • addedInput schema / properties / ops / items / properties / includes_use_phase
      Added value: +{
      +  "description": "set_boundary: true = the bill includes use-phase items (operational energy, water, maintenance, replacements); false = the use phase is deliberately excluded. Omit to keep the current declaration.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / ops / items / properties / op / enum
      Previous value: -[
      -  "replace_provider",
      -  "set_target_amount",
      -  "set_title",
      -  "add_member",
      -  "remove_member",
      -  "set_member_amount",
      -  "add_stage",
      -  "remove_stage"
      -]New value: +[
      +  "replace_provider",
      +  "set_target_amount",
      +  "set_title",
      +  "add_member",
      +  "remove_member",
      +  "set_member_amount",
      +  "add_stage",
      +  "remove_stage",
      +  "set_boundary"
      +]
    • addedInput schema / properties / ops / items / properties / scope
      Added value: +{
      +  "description": "set_boundary: the new declared system boundary; omit to keep the current one.",
      +  "enum": [
      +    "cradle_to_gate",
      +    "cradle_to_grave",
      +    "end_of_life"
      +  ],
      +  "type": "string"
      +}
  4. 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."
  5. 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
    • addedInput schema / properties / base_version_seq / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / ops / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / ops / items / properties / inputs / items / additionalProperties
      Removed value: -false
  6. Changed2 schema fields changed
    • 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: -[
      -  "ref",
      -  "ops"
      -]New value: +[
      +  "workspace",
      +  "ref",
      +  "ops"
      +]
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, but the description adds substantial context beyond them: in-place edits append a content version, drift-tracked mirrors auto-fork with a warning, `replace_provider` moves and may drop a phase tag with a warning, and unit compatibility is the only check so swaps can silently change geography/technology/year. These are precisely the side effects and caveats an agent needs before mutating a system.

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 and op list, then layers on mode, unit, and caveat information. It is dense but every paragraph carries operational information; a slightly tighter phrasing could trim length without losing meaning.

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?

Given a complex multi-op mutation tool with no output schema, the description covers selection, alternatives, mode behavior, ref format, unit handling, warning behavior, and follow-up assessment. The one notable omission, `base_version_seq` being required despite schema optionality, is fully documented in the schema itself.

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 100%, so the baseline is 3. The description still adds value by grouping the ops, explaining the default `edit` mode versus `fork`, and warning that members are `p<N>` refs and UUIDs are not accepted. It reinforces the cross-cutting unit-conversion rule, though most per-field semantics remain in 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?

States a specific verb and resource: 'Patch a saved composed (bill-of-materials) system (`s<N>`)', then enumerates the exact ops available. It explicitly distinguishes itself from the sibling `lca_edit_linked` for linked and single-process systems, so an agent can route correctly without opening 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 Guidelines5/5

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

Names the alternative tool (`lca_edit_linked`) and the condition that selects it, explains the `mode` default and fork behavior, and tells the agent the returned ref can be assessed with `lca_run_assessment`. When-to-use and when-not-to-use are both explicit.

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