Skip to main content
Glama
rush-db

RushDB MCP Server

Official
by rush-db

detachRelation

Destructive

Remove relationships between a source record and target records, optionally by relation type and direction. Detach outgoing, incoming, or bidirectional graph links to clean up record connections.

Instructions

Remove the relationships between a record and target records. Without relationType it removes relationships of every type; with direction "bidirectional" it removes them both ways. Not available inside a transaction. Use findRelationships to inspect existing relationships and confirm the correct type/direction before detaching.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceIdYesID of the source record
targetIdNoID of one target record (deprecated if targetIds provided)
directionNoDirection of the relationshipoutgoing
targetIdsNoIDs of multiple target records
relationTypeNoType of the relationship to remove; omit to remove every type

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A4.1/5.0
Behavior4/5

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

Adds two behavioral facts not carried by the annotations: the tool is unavailable inside a transaction, and omitting relationType widens the destructive blast radius to every relation type. That meaningfully supplements destructiveHint=true. It stops short of saying what happens when no matching relationship exists (error vs silent no-op) or any authorization requirement.

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?

Three tight sentences: operation first, then the two parameter-driven behaviors, then the prerequisite inspection step. Every sentence carries distinct information with no restatement of the tool name.

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?

With an output schema present, return values need no explanation, and the description covers the destructive scope, transaction restriction, and verification workflow. A no-match/error behavior note would make it complete for a destructive mutation.

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 earns extra credit by explaining the interaction semantics of relationType omission and direction='bidirectional' rather than just restating the field docs. It does not mention the targetId/targetIds deprecation trade-off handled in the schema.

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+resource ('Remove the relationships between a record and target records') with the scope of what a relation is. Clear enough to separate from attachRelation, though it never names attachRelation as the inverse operation — it only routes to findRelationships.

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 explicit pre-call guidance: use findRelationships to inspect and confirm the correct type/direction before detaching. It also states the selection conditions for the optional params (omit relationType = all types, bidirectional = both ways). Missing only an explicit 'do not use this when you meant to move/update a relation' exclusion.

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