Skip to main content
Glama

merge_concepts

Merge duplicate concept nodes into a single canonical node, copying missing properties and rewiring all relationships, to resolve inconsistencies from naming variations.

Instructions

Merge a duplicate concept node into the primary, re-wiring all edges.

    Use when the LLM extracted the same concept twice with slightly different names
    (e.g. "MOSFET" and "MOSFET Transistor") and you want to consolidate them.

    Steps performed automatically:
      1. Gap-fill: properties present on duplicate but absent on primary are copied.
      2. All outgoing edges from duplicate are re-created on primary (idempotent MERGE).
      3. All incoming edges to duplicate are re-pointed to primary (idempotent MERGE).
      4. Duplicate node is permanently deleted.

    To find candidates: use query_knowledge to search for near-duplicate concepts,
    or check find_bridges for concepts that reference each other indirectly.

    Args:
        primary_id: concept_id of the node to keep (the canonical one).
        duplicate_id: concept_id of the node to absorb and delete.

    Returns:
        JSON summary with rewired edge counts and deletion confirmation.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
primary_idYes
duplicate_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, so the description carries the full burden. It discloses destructive behavior ('permanently deleted'), the exact steps performed (gap-fill, edge rewiring), and idempotency of MERGE operations, fully disclosing side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a lead sentence, numbered steps, and parameter definitions. Despite its length, each sentence contributes useful information with no filler.

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 destructive graph operation, the description covers purpose, workflow, parameters, return value, and discovery alternatives. It is self-contained even without annotations or output schema.

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 0% (params only typed as string), and the description adds crucial meaning by defining primary_id as the canonical node and duplicate_id as the node to absorb and delete, going well beyond 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?

The description states a specific verb ('Merge') and resource ('duplicate concept node into the primary'), and clearly distinguishes from siblings like retract_node or reinforce_concept by explaining the re-wiring and consolidation purpose.

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?

Provides explicit when-to-use (LLM extracted same concept twice with slightly different names) and references alternative tools for finding candidates (query_knowledge, find_bridges).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xz0831/openclaw-brain'

If you have feedback or need assistance with the MCP directory API, please join our Discord server