Skip to main content
Glama

Edit linked product system

lca_edit_linked
Destructive

Patch a saved linked or single-process system (s<N>). A linked system is an explicit process network. Graph ops: add_link (wire a supplier onto a consumer input, or a waste output onto its treatment; the provider joins automatically), remove_link (drop matching edges; orphans are pruned), rewire_link (repoint one edge). Also replace_provider (swap a supplier on every edge it feeds; a bare unit_process swap warns: its background is unwired), set_target_amount, set_title and set_boundary (phases only). A swap checks units only; geography, technology and vintage can change. lca_get(ref='s<N>', form='authored') shows every edge and the consumer_input_index needed when a consumer has one flow on several exchanges. A link's amount only validates. mode edit (default) patches in place; fork derives a new s<M>; a mirror forks on a content change. A single-process system takes only the setters. Composed systems use lca_edit_assembly. Takes p<N>/f<N> refs; UUIDs are not accepted.

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_linked"
  }
}

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. Changed1 schema field 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)."
  2. Changed3 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"
      +}
    • changedInput schema / properties / ops / items / properties / op / enum
      Previous value: -[
      -  "add_link",
      -  "remove_link",
      -  "rewire_link",
      -  "replace_provider",
      -  "set_target_amount",
      -  "set_title"
      -]New value: +[
      +  "add_link",
      +  "remove_link",
      +  "rewire_link",
      +  "replace_provider",
      +  "set_target_amount",
      +  "set_title",
      +  "set_boundary"
      +]
  3. Changed4 schema fields changed
    • changedInput schema / properties / ops / items / properties / consumer_input_index / description
      Previous value: -"Which of the consumer's input exchanges of `flow_ref` this edge feeds — the 0-based index `lca_get form='authored'` reports per link. add_link: REQUIRED when the consumer has 2+ input exchanges of that flow (the call tells you the valid range if it is). remove_link/rewire_link: optional, narrows the match to one edge."New value: +"Which of the consumer's input exchanges of `flow_ref` this edge feeds (for a waste: which OUTPUT exchange of it) — the 0-based index `lca_get form='authored'` reports per link. add_link: REQUIRED when the consumer has 2+ such exchanges of that flow (the call tells you the valid range if it is). remove_link/rewire_link: optional, narrows the match to one edge."
    • changedInput schema / properties / ops / items / properties / consumer_ref / description
      Previous value: -"add_link/remove_link/rewire_link: `p<N>` of the process that CONSUMES the flow. It must already be a member of this system."New value: +"add_link/remove_link/rewire_link: `p<N>` of the process that CONSUMES the flow (for a waste: the process that OUTPUTS it). It must already be a member of this system."
    • changedInput schema / properties / ops / items / properties / flow_ref / description
      Previous value: -"add_link/remove_link/rewire_link: `f<N>` of the product flow on the edge."New value: +"add_link/remove_link/rewire_link: `f<N>` of the product flow on the edge, or of a waste routed to its treatment."
    • changedInput schema / properties / ops / items / properties / provider_ref / description
      Previous value: -"add_link: `p<N>` of the process that SUPPLIES the flow (it joins the system's members automatically). remove_link: OPTIONAL — narrows the removal to edges from this supplier; omit to remove every supplier of that flow into the consumer."New value: +"add_link: `p<N>` of the process that SUPPLIES the flow — for a waste, its treatment (it joins the system's members automatically). remove_link: OPTIONAL — narrows the removal to edges from this supplier; omit to remove every supplier of that flow into the consumer."
  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
    • addedInput schema / properties / ops / items / properties / consumer_input_index / maximum
      Added value: +9007199254740991
  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.5/5.0
Behavior5/5

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

Annotations only flag destructive/non-idempotent; the description goes well beyond them by disclosing that a provider joins automatically, orphans are pruned on removal, a bare `unit_process` swap warns about an unwired background, a swap validates units only (geography/technology/vintage may drift), `amount` never changes results, and mirrors auto-fork. These are exactly the consequences an agent needs before a destructive patch.

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 purpose and the op inventory, then constraints, then routing — good ordering with no filler sentences. It loses a point for some duplication of schema content (the `amount` validation-only rule and `mode` semantics appear in both places).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive multi-op mutation with no output schema, the description covers op semantics, membership rules, ref format restrictions (`p<N>`/`f<N>`, no UUIDs), and the sibling alternative. It is silent on what a successful call returns (e.g. the new `version_seq`), which matters because the schema requires re-reading between edits.

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 documents every field, including `consumer_input_index`, `amount` validation-only, and `mode`. The description largely restates that material rather than adding syntax or format detail beyond it, so the baseline 3 applies.

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 linked or single-process system (`s<N>`)") and immediately defines what a linked system is. It then enumerates the exact graph operations available and names the sibling it is not (`lca_edit_assembly` for composed systems), so an agent can distinguish it 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?

Explicitly routes: composed systems go to `lca_edit_assembly`, single-process systems take only the setters, and `lca_get(ref='s<N>', form='authored')` is named as the prerequisite read to find edges and `consumer_input_index`. It also states the edit-vs-fork decision rule and the mirror auto-fork exception, leaving little to inference.

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