Skip to main content
Glama

relateBatch

Assert multiple subject-predicate-object relations in one atomic event-log append, validating every edge first so a single invalid endpoint aborts the entire batch.

Instructions

Assert multiple (subject, predicate, object) relations in ONE atomic event-log append. All edges are validated before any write: a single invalid endpoint aborts the entire batch. Use this to seed a graph in one call instead of N sequential relate() calls. Returns the new relation resource names in input order.

Input Schema

NameRequiredDescriptionDefault
sourceNoProvenance label for all appended events, e.g. "mcp:relateBatch". Optional; defaults to "mcp:relateBatch".
relationsYesArray of relation assertions to append atomically.

Output Schema

NameRequiredDescriptionDefault
countYesNumber of relations appended.
namesYesAIP resource names of the asserted Relations, in input order.
statusYesAlways "asserted" on success.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden — and it does disclose the key behavioral traits: atomicity, validate-before-write, all-or-nothing abort, and return ordering. It does not cover permission requirements for team scope (only the schema does, via E_PERMISSION), idempotency on retry, or batch size limits, so it falls short of fully complete for a write tool.

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 sentences, each earning its place: what it does, the atomicity guarantee, the alternative it replaces, and the return shape. The most decision-relevant fact (ONE atomic append) is front-loaded in capital letters.

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 2-parameter batch-write tool with a full output schema and 100% schema coverage, the description supplies exactly the missing decision layer: atomicity and error behavior. Return values are already covered by the output schema, so no gap remains that would prevent a correct call.

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% and the nested relation fields are richly documented, so the baseline is 3. The description adds only the 'input order' return guarantee and the atomic grouping; it does not add syntax or format meaning beyond what the schema already states.

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 ('Assert multiple (subject, predicate, object) relations in ONE atomic event-log append') and explicitly contrasts with the sibling relate() by batching. An agent can distinguish it from relate and from query/neighbors without opening any schema.

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?

Names the alternative ('instead of N sequential relate() calls') and the condition that selects this tool: seeding a graph in bulk. It also gives the exclusionary rule that a single invalid endpoint aborts the whole batch, which tells the agent when this tool is risky versus safe per-edge calls.

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