Skip to main content
Glama

Traceable

Add a reference

traceable_library_add_reference
Idempotent

Attach a Reference Library item — or another document — to this document's reference list, and ensure a Reference Table row exists to display it (created at the end of the body if absent). To put the table somewhere else, write [[reference-table]] there first (e.g. with traceable_segment_write); this tool then uses that row rather than adding a second one. Pass code_or_id (a library item's REF code e.g. REF-00001A, or its id — from traceable_library_search) OR targetDocumentId (a document to cite) — exactly one. The referenced version defaults to the target's current/published version; override with referencedVersion. Idempotent: re-adding an existing reference succeeds without duplicating it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
code_or_idNoReference Library item REF code (e.g. REF-00001A) or its UUID
documentIdYesThe document to add the reference to
targetDocumentIdNoInstead of a library item, cite another document by its UUID
referencedVersionNoPin a specific version (default: the target's current/published version)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing a real side effect: a Reference Table row is created at the end of the body if absent, and an existing [[reference-table]] marker is reused rather than duplicated. The idempotency claim is somewhat redundant with idempotentHint=true, and it doesn't cover permissions or failure modes, but the table-creation behavior is genuinely new information.

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?

Dense and front-loaded, with the core action in the first clause and the alternative-placement caveat immediately after. The sentences are long and could be split, but essentially every clause carries actionable information, so little is wasted.

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 tool with no output schema, the description covers side effects, idempotency, placement mechanics, and parameter exclusivity. It stops short of stating permission requirements or error behavior for an invalid REF code, which is the remaining gap.

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 the baseline is 3, but the description adds a real constraint not encoded in the schema: that code_or_id and targetDocumentId are mutually exclusive ('exactly one'). It also clarifies the REF-code-vs-UUID duality and the referencedVersion default, adding meaning over the field descriptions.

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 ('Attach a Reference Library item — or another document — to this document's reference list') plus the side effect of ensuring a Reference Table row. It distinguishes itself from siblings like traceable_link and traceable_segment_write by naming them where their behavior overlaps.

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?

Gives clear conditions: pass exactly one of code_or_id (from traceable_library_search) or targetDocumentId, and use traceable_segment_write to place [[reference-table]] elsewhere. It routes the agent to the right sibling for the lookup and the alternate placement case, though it never states when this tool is the wrong choice versus traceable_link.

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.

Resources