Skip to main content
Glama

Edit an electrical diagram

apply_patch
Idempotent

Edit an electrical diagram by node id (change a rating, add a circuit, move a load...) and return the new document. ops (applied in order): {"op":"set","id":ID,"path":"in_A","value":20} (null value removes; no id = document root, e.g. path "installation.earthing"); {"op":"add","parent":ID,"node":{...},"index":0} (or "at":"sources"); {"op":"remove","id":ID}; {"op":"move","id":ID,"parent":ID,"index":0}; {"op":"rename","id":ID,"new_id":NEW}; {"op":"link","link":{"kind":"control","from":ID,"to":ID}}; {"op":"unlink","id":LINK_ID} or {"op":"unlink","from":ID,"to":ID,"kind":K}. On failure returns ok=false and errors naming the failing op index (null = validation of the result).

Input Schema

NameRequiredDescriptionDefault
opsYesThe edit operations, applied in order (list, or its JSON text): see the description for the operation forms.
documentYesThe uniwire document of the electrical installation: a JSON object, or its JSON text, as returned by get_example, apply_patch or normalize (a file path is accepted when the server runs locally).
validateNoValidate the resulting document (default true).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / document / description
      Added value: +"The uniwire document of the electrical installation: a JSON object, or its JSON text, as returned by get_example, apply_patch or normalize (a file path is accepted when the server runs locally)."
    • addedInput schema / properties / ops / description
      Added value: +"The edit operations, applied in order (list, or its JSON text): see the description for the operation forms."
    • addedInput schema / properties / validate / description
      Added value: +"Validate the resulting document (default true)."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false; the description goes beyond them by disclosing op ordering semantics, null-means-remove, and the failure contract (ok=false with errors naming the failing op index, null meaning result validation). It does not state atomicity — whether one bad op aborts the whole batch — or any size limits, which keeps it below a 5.

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 purpose sentence followed by a compact, scannable catalogue of op forms; nearly every clause carries information. Some shorthand ('or "at":"sources"', 'path "installation.earthing"') is left unexplained, making the payload dense rather than wasteful.

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?

Return values are covered by an output schema and the description still names the success payload and error shape, so the failure contract is complete. What is missing is how an agent obtains valid node ids and how edits relate to validation/normalization siblings, which matters for a mutation tool with a free-form ops payload.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

Schema coverage is 100%, but the 'ops' parameter is an untyped anyOf array/string whose schema explicitly defers to the description, so the description is the only source of the operation grammar (set/add/remove/move/rename/link/unlink with their key shapes). That is genuine meaning added beyond the schema, not repetition of it.

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, resource, and editing medium ('Edit an electrical diagram by node id') with concrete examples of the edit kinds (change a rating, add a circuit, move a load) and names the return value (the new document). An agent can separate this from siblings like validate, normalize, or render purely from the description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied: the tool is for editing an existing document via ops, and the validate flag hints at a check step, but the description never says when to prefer it over normalize, validate, or a full re-authoring flow, nor when NOT to use it. No prerequisites (where node ids come from) are given, so the agent must infer the workflow.

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.