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 and set_title. A swap checks only unit compatibility, so 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 is forked automatically. A single-process system takes only the two setters. Composed systems use lca_edit_assembly. Takes p<N>/f<N> refs; UUIDs are not accepted.

Input Schema

TableJSON 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. 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."
  2. 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."
  3. 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
  4. 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"
      +]
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare mutation/destructive/non-idempotent; the description adds substantial context beyond that: in-place edits append a content version, mirrors auto-fork with a warning, orphans are pruned on removal, a provider swap checks only unit compatibility so geography/technology/vintage can change, and a bare `unit_process` swap warns its background is unwired.

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 dense semicolon-separated clauses. Nearly every sentence carries distinct information (ops semantics, mode behavior, ref format), though the wall-of-text style is slightly heavy even for a tool this complex.

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 tool with a nested `ops` array, six op types, and no output schema, the description is remarkably complete: it enumerates each op, the mode semantics, ref format constraints, the authored-view workflow, and the single-process caveat. Nothing essential for correct invocation is missing.

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, but the description adds real meaning: refs take `p<N>`/`f<N>` and 'UUIDs are not accepted', `amount` on a link is validation-only, and `consumer_input_index` is required when a consumer has 2+ exchanges of a flow. These clarify usage beyond the schema text.

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 ('Patch') and resource (a saved linked or single-process `s<N>` system), and explicitly distinguishes itself from `lca_edit_assembly` for composed systems and notes the single-process restriction. An agent can tell it apart from siblings 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?

Gives explicit when-to-use routing: 'A single-process system takes only the two setters' and 'Composed systems use `lca_edit_assembly`'. It also points to `lca_get(ref='s<N>', form='authored')` as the way to discover edges and the required `consumer_input_index`, and explains when `fork` vs `edit` applies.

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