Skip to main content
Glama
ianderso
by ianderso

link_repository

Link an existing source to the repository that holds it, adding an optional call number and skipping duplicate links. Use it to record where a source is archived or stored.

Instructions

Link an existing source to an existing repository that holds it.

Adds a repository reference (with an optional call number) to the source. Both objects must already exist. Duplicate links to the same repository are skipped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSource handle or gramps_id (e.g. 'S0001').
media_typeNoMedium of the source at the repository, e.g. 'Book', 'Microfilm', 'Electronic', 'Unknown'.Unknown
repositoryYesRepository handle or gramps_id (e.g. 'R0001').
call_numberNoCall number / reference within the repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive write. The description adds genuine context beyond them: it creates a repository reference on the source, the call number is optional, prerequisites are validated, and duplicate links are skipped. However 'duplicate links are skipped' reads as idempotent-on-repeat behavior while idempotentHint=false is declared, so the agent's retry inference is left slightly ambiguous rather than clarified.

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?

Three short sentences, front-loaded with the core action and no filler. The duplicate-skip sentence is useful, though the middle sentence ('Adds a repository reference...') partially restates the first, keeping it from a clean 5.

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?

For a 4-parameter mutation with no output schema, the description covers the key agent needs: prerequisites, what is created, optionality of the call number, and duplicate handling. It omits permission/auth requirements and any confirmation of the mutated state, which would be the last gap for a write 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 all four parameters including source, repository, media_type and call_number are already documented at the schema level. The description only echoes the optional call number and adds no format or handle/gramps_id syntax beyond the schema; baseline 3 is appropriate.

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 (link) plus both resources (existing source, existing repository) and immediately distinguishes itself from the add_source/add_repository siblings by requiring that both objects already exist. An agent can tell what it does and what it is not (create) without opening the 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?

Explicit prerequisites: 'Both objects must already exist' and 'Link an existing source to an existing repository.' It also says duplicate links are skipped, which tells the agent retry behavior. It does not name a competing sibling (e.g. add_repository) or state when not to use it, so it stops 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.