Skip to main content
Glama

retract_node

Soft-delete or hard-delete an incorrect knowledge node to remove hallucinations and factually wrong entries from the graph, preserving audit trail with soft delete.

Instructions

Retract (soft-delete or hard-delete) a knowledge node.

    Use when a node was incorrectly extracted, is factually wrong, or is
    a hallucination that slipped through grounding checks.

    Soft delete (default, hard_delete=false):
      Sets retracted=true on the node. It remains in the graph for audit purposes
      but is excluded from all searches, retrieval, and concept matching.
      Recoverable: set retracted=false manually if needed.

    Hard delete (hard_delete=true):
      Permanently removes the node and ALL its edges. Irreversible.
      Use only for nodes with zero useful relationships.

    Supported labels: Concept, Equation, Principle, CircuitTopology, Parameter,
      Assumption, Insight, Hypothesis, DesignDecision, BenchResult.

    Args:
        node_id: The ID value (e.g. the concept_id, equation_id, etc.).
        label: Node type — "Concept", "Equation", "Parameter", etc.
        reason: Human-readable reason (stored on the node for audit trail).
        hard_delete: If True, permanently delete. Default: False (soft-delete).

    Returns:
        JSON with action taken and whether the node was found.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYes
reasonNo
node_idYes
hard_deleteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and excels. It details the exact effects of soft delete (sets retracted=true, remains for audit, excluded from search/retrieval/concept matching, recoverable) and hard delete (permanently removes node and ALL edges, irreversible). It also explains the audit trail via the reason parameter and the return format. This is comprehensive and beyond what any annotation could provide.

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?

The description is well-structured with sections for usage, soft/hard delete behavior, supported labels, args, and returns. It is slightly verbose but every sentence earns its place by providing critical operational detail. The front-loaded summary makes the core purpose immediately apparent, and the layout aids scanning. No redundancy was found.

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?

Despite the tool having an output schema (not otherwise shown), the description still describes the return value ('JSON with action taken and whether the node was found'). It covers all necessary context: operation types, side effects, recoverability, irreversibility, supported labels, parameter semantics, and usage triggers. For a tool with 4 parameters and no annotations, this is thoroughly complete.

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 description coverage is 0%, so the description must fully compensate, and it does. Each parameter (node_id, label, reason, hard_delete) is given a meaningful explanation, including defaults and examples (e.g., 'node_id: The ID value (e.g. the concept_id, equation_id, etc.)'). Hard_delete is clearly defined with its default value and boolean semantics. This adds substantial value above the bare 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 opens with a clear verb+resource statement: 'Retract (soft-delete or hard-delete) a knowledge node.' It specifies both the action (retract) and the resource (knowledge node), distinguishing it from sibling tools like retract_executable. The purpose is unambiguous and fully differentiates from alternatives.

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?

The description explicitly states when to use the tool: 'Use when a node was incorrectly extracted, is factually wrong, or is a hallucination that slipped through grounding checks.' It also provides usage distinctions between soft and hard delete, including when hard delete is appropriate ('only for nodes with zero useful relationships'). This exceeds mere context by offering explicit exclusions and decision criteria.

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