Skip to main content
Glama
RushDB MCP Server

RushDB MCP Server

Official
by rush-db

updateRelation

Modify properties of existing relationships of a given type between a source record and target records by setting or unsetting values; missing relationship pairs are skipped.

Instructions

Change the properties of existing relationships of one type between a record and target records: set writes values (null stores an explicit null), unset removes properties. Pairs without such a relationship are skipped; updated counts the relationships changed. Not available inside a transaction. Use findRelationships first to confirm the relationship type, direction and current properties.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sourceId": "<sourceId>",
      "relationType": "<relationType>"
    },
    "name": "updateRelation"
  }
}

Input Schema

NameRequiredDescriptionDefault
setNoProperties to write on the relationships. Scalars or arrays of one scalar type; reserved RushDB/internal keys are rejected.
typesNoType of `set` properties whose JSON form is ambiguous, e.g. { "since": "datetime" } stores an ISO 8601 string as a datetime. Every name must also be in `set`.
unsetNoNames of properties to remove from the relationships
sourceIdYesID of the source record
targetIdNoID of one target record (deprecated if targetIds provided)
directionNooutgoing: source → target (default); incoming: target → sourceoutgoing
targetIdsNoIDs of multiple target records
relationTypeYesType of the relationships to update

Output Schema

NameRequiredDescriptionDefault
messageYes
successYes
updatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare it is not read-only and not destructive; the description adds substantive context: transactional restriction, explicit-null storage, that non-matching pairs are silently skipped, and that the response reports an `updated` count. The mention that `unset` removes properties is consistent with destructiveHint=false since it is a scoped property removal, not a link deletion.

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?

Four short sentences, front-loaded with the core action, then the set/unset semantics, then edge-case behavior, then the prerequisite. No filler and no repetition of schema content.

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 mutation tool with 8 parameters and an output schema, this covers the important behavioral edges an agent needs: transaction restriction, partial-application semantics, and the recommended discovery call. Return values are already documented by the output schema.

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 baseline is 3, but the description adds real meaning beyond it: null in `set` stores an explicit null, `unset` names properties to remove, and `direction` should be verified via findRelationships before calling. It does not explain `types` or the targetId/targetIds deprecation, which the schema already covers.

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?

States a specific verb and resource ('Change the properties of existing relationships of one type') and scopes it to a source record and target records. This clearly separates it from attachRelation/detachRelation, which create or remove links rather than modify properties.

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?

Explicitly directs the agent to call findRelationships first to confirm relationship type, direction and current properties, and warns it is not available inside a transaction. It does not explicitly name attachRelation/detachRelation as the alternatives for creating or removing links, though the 'pairs without such a relationship are skipped' behavior implies it.

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