Skip to main content
Glama
ianderso
by ianderso

link_repositories

Link many sources to repositories in one call. Each row is independent, so failures don't stop the batch and status is reported per row.

Instructions

Link many sources to their repositories in one call -- a sweep.

Each row is link_repository: its own write and transaction, so a failed row does not stop the rest. Each row reports linked, already_linked, missing or error.

Input Schema

NameRequiredDescriptionDefault
itemsYesRows of {source, repository, call_number?, media_type?}.
allow_new_typeNoAccept a type that is neither a Gramps standard type nor one of the tree's custom types, creating it as a new custom type. Only when meant: a near-miss is refused with the closest names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • addedInput schema / properties / allow_new_type
      Added value: +{
      +  "default": false,
      +  "description": "Accept a type that is neither a Gramps standard type nor one of the tree's custom types, creating it as a new custom type. Only when meant: a near-miss is refused with the closest names.",
      +  "type": "boolean"
      +}
  2. Addedv1.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare the safety profile (not read-only, not destructive, not idempotent), and the description adds genuinely new behavior: each row is its own write and transaction, a failed row does not stop the rest, and each row reports linked/already_linked/missing/error. It does not mention permissions or the 500-row cap, keeping it just short of 5.

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 short sentences, front-loaded with the core action and then the failure-isolation and result semantics. Every sentence earns its place with 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?

With no output schema, the description carries the return burden and does so by enumerating the four per-row statuses and the failure-isolation guarantee. It omits batch-size limits and how allow_new_type interacts with per-row errors, leaving minor gaps for a mutation 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 items, source, repository, call_number, media_type, and allow_new_type. The description adds only that rows are link_repository-shaped, which the schema itself states; no extra syntax or format detail is provided.

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 (link many sources to their repositories) and frames it as a bulk sweep, immediately distinguishing it from the singular sibling link_repository. An agent can tell it apart from link_repository without opening 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?

'Link many sources ... in one call -- a sweep' establishes the bulk context, and 'Each row is link_repository' tells the agent this is the batch equivalent of the singular tool. There is no explicit when-not or named alternative for the single-link case, so guidance is clear but not fully specified.

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