Skip to main content
Glama

Merge elements

merge_elements
Destructive

Unites the body of a part element with one target (guid) into one body without a seam; the target keeps its GlobalId, class, properties and relations, the part is deleted (a plan). New revision, effect report (n_changed, rejected, cloned, carried). A call that succeeds is not a job that's done. Target: guid, guids or a set from find_elements/get_selection, never a filter. Beyond the named: PLAN_REQUIRED, run its plan_id with expect_beyond. Checked exactly before writing: the bodies overlap or share a face, the result holds both. The part's own properties go with it, the target's quantities are removed; set_dimension no longer reaches the united body.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "merge_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
setNoA set id from find_elements or get_selection: writes exactly the elements seen there, nothing that matches later. An element changed since reading is rejected alone; the others are written
guidNoOne element (GlobalId)
noteNoYour note, stored with the new revision
partNoThe element whose body joins the target; deleted afterwards
guidsNoThese elements (GlobalIds)
dry_runNoPreview: the planned effect and a plan_id, nothing written
plan_idNoExecute exactly the plan a dry_run returned, all or nothing; the plan holds target and fields. Plans that clone the same shared object (type, material) run one after the other: plan the second after the first ran, else PLAN_CHANGED
request_idNoYour id for this call: a repeat answers the first result and writes nothing
expect_countNoWith set: how many elements the set holds - guards against a mixed-up set id
expect_beyondNoWith plan_id: how many elements the plan reaches beyond those named (n_beyond of PLAN_REQUIRED or the dry_run)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / expect_contacts
      Removed value: -{
      -  "description": "Intended contacts: checks.contacts splits into as_expected, missing, surprises; an omitted kind is not judged",
      -  "properties": {
      -    "clash": {
      -      "anyOf": [
      -        {
      -          "const": "none",
      -          "type": "string"
      -        },
      -        {
      -          "items": {
      -            "type": "string"
      -          },
      -          "type": "array"
      -        }
      -      ],
      -      "description": "GlobalIds they may clash with; none: no clash"
      -    },
      -    "touch": {
      -      "description": "GlobalIds the written elements should touch",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "type": "object"
      -}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotent, and the description adds substantial context beyond them: what gets destroyed (the part's body and its own properties), what survives (target GlobalId, class, properties, relations), that a new revision is created, and the effect report fields. It also discloses pre-write validation ('the bodies overlap or share a face, the result holds both') and downstream consequences ('the target's quantities are removed; set_dimension no longer reaches the united body'). That is exactly the kind of consequence disclosure a destructive merge needs.

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 operation and its outcome before the targeting and plan mechanics. The prose is dense and occasionally telegraphic ('the part is deleted (a plan)', 'Beyond the named: PLAN_REQUIRED'), which costs a little readability, but almost every clause carries operational information rather than filler.

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 10-parameter, destructive, no-output-schema tool, the description covers the outcome, the revision created, the shape of the effect report, and the plan/verify workflow. Remaining gaps are minor, such as what a rejection of an individual element looks like in the report and how partial set writes behave beyond what the set parameter already documents.

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 coverage is 100%, so the baseline is 3. The description adds some meaning beyond the schema, mainly the rule that targets come from guid/guids/set and never a filter, and that expect_beyond relates to n_beyond of PLAN_REQUIRED or the dry_run. It does not explain the interplay of count guards or why the plan must be re-run after another plan cloning the same shared object, leaving that to the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Unites the body of a part element with one target (guid) into one body without a seam', and names the consequence (part deleted, target keeps GlobalId/class/properties/relations). An agent can tell this apart from delete_elements or copy_elements from the description alone. It stops short of naming an explicit sibling to use instead for the inverse operation (split_element).

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

Usage Guidelines4/5

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

Gives concrete routing guidance for the target: 'guid, guids or a set from find_elements/get_selection, never a filter', which prevents a common misuse. It also tells the agent the workflow ('A call that succeeds is not a job that's done', PLAN_REQUIRED, run plan_id with expect_beyond). No explicit when-not-to-use-this-tool statement beyond the filter exclusion.

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