Skip to main content
Glama
rush-db

RushDB MCP Server

Official
by rush-db

attachRelation

Links existing records by creating directed or bidirectional relationships between source and target IDs; resolve IDs with findRecords before linking.

Instructions

Create a directed or bidirectional relationship between records. sourceId and targetId/targetIds must already exist — use findRecords to resolve records by name/attribute first.

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
propertiesNoOptional user-defined properties to store on the relationship edge. Reserved RushDB/internal keys are rejected.
relationTypeNoType of the relationship
transactionIdNoOptional transaction ID for atomic relation creation

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the agent knows this mutates local state without being destructive. The description adds the useful pre-existence constraint and the findRecords prerequisite, but says nothing about duplicate-edge behavior, idempotency, permission requirements, or transaction semantics despite a transactionId parameter.

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?

Two tight sentences: the first states the action, the second states the precondition and the remedy. The critical constraint is front-loaded and there is no 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?

An output schema exists, so return values need no explanation, and the 7-parameter surface is fully described in the schema. The remaining gap is minor: the description says 'directed or bidirectional' while the enum also offers 'incoming', leaving the direction semantics slightly under-explained for an edge-creation tool.

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 description coverage is 100%, so the schema already documents sourceId, targetId/targetIds, direction, properties and transactionId; the baseline is 3. The description only reinforces the targetId/targetIds pre-existence requirement and adds nothing about direction values or property restrictions beyond what the schema states.

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?

The description gives a specific verb and resource — 'Create a directed or bidirectional relationship between records' — so the agent immediately knows this is an edge-creation operation. It does not, however, explicitly distinguish itself from the inverse sibling detachRelation or the read-only findRelationships, so it falls short of a 5.

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?

It states a concrete precondition (sourceId and targetId/targetIds must already exist) and routes the agent to findRecords for resolution, which is genuine when-to-use guidance. It stops short of when-not-to-use, e.g. that detachRelation removes edges or that records must pre-exist rather than be auto-created, so it is clear but not exhaustive.

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