Skip to main content
Glama

add_relations_batch

⚡ Creates several FK relations in a single call — used in phase 3 of the ERD workflow, after all the reference fields have been created via add_fields_batch. Each entry defines cardinalityFrom + cardinalityTo (Merise crow's foot).

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": {
      "relations": "<relations>"
    },
    "name": "add_relations_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
relationsYesList of relations to create in a single call.
expectedProjectIdNoUUID of the project THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  3. Changed2 schema fields changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / relations / description
      Previous value: -"Liste de relations à créer en un seul appel."New value: +"List of relations to create in a single call."
  4. First observed

TDQS

A4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the agent knows this is a non-destructive write. The definition adds ordering context (a prerequisite of earlier field creation), which is genuinely useful. However, for a batch mutation it says nothing about atomicity: whether one invalid entry aborts the whole batch, what happens if a relation already exists, or whether a size limit applies.

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?

It consists of two tight sentences, with the batch scope front-loaded ahead of the workflow prerequisite, and neither sentence is filler. The leading ⚡ glyph is decorative noise, but otherwise nothing needs rewriting.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nested-array mutation with no output schema and only two top-level parameters, the definition covers purpose, timing and cardinality notation. It leaves out what the call returns (created relation IDs? partial failures?), whether the call is atomic, and what a valid fromCellId/toCellId pairing requires — gaps an agent would hit on the first call.

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 description coverage is 100%, so the baseline is 3; the definition earns one extra point by giving each entry's cardinalityFrom/cardinalityTo a meaning (Merise crow's foot notation), which is context the enum values alone ('one', 'many', 'zero_or_one') do not convey. The onDelete/onUpdate referential actions and expectedProjectId override are still left entirely to 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 definition does three things: it names a specific verb and resource ("Creates several FK relations"), states the scope ("in a single call"), and thereby distinguishes itself from the singular sibling add_relation. The agent can tell from the phrase "several ... in a single call" that this tool is the batch form, without needing to open either schema.

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 gives explicit context for when to use the tool: "phase 3 of the ERD workflow, after all the reference fields have been created via add_fields_batch". This is a strong, checkable prerequisite condition rather than a vague cue. It still never says when not to use the tool (for example, for a single relation, where add_relation is the alternative), so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.