Skip to main content
Glama

get_document_links

Read-only

Retrieve inbound and outbound links for a document, with provenance, confidence, and ambiguity flags, to map how documents reference each other.

Instructions

What one document links to and from, strongest first. Each link says how it is known: declared (a person made it), extracted (the file says so), or inferred (a reading that could be wrong), with a confidence and the file and line it came from. A reference that could mean several documents is listed as ambiguous with its candidates, and is never drawn as a link. doc_id is the id get_docs returns. Read-only.

Input Schema

NameRequiredDescriptionDefault
limitNoMost links to show (default 50)
doc_idYesA document id, as get_docs returns it
relationNoOnly links of this kind
directionNoDefault both

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description adds substantial behavior beyond that: link provenance tiers (declared/extracted/inferred), a confidence value, source file and line, and the rule that ambiguous references are listed with candidates but never drawn as links. That is real disclosure about what comes back and how much to trust it. The restated 'Read-only' is redundant with the annotation but not contradictory.

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 front-loaded sentences: ordering first, then provenance semantics, then the ambiguity caveat, ending with the read-only note. Dense and mostly earn-its-place, though 'Read-only.' duplicates the readOnlyHint annotation.

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 burden of explaining return values and does so well: each link's provenance, confidence, and file/line origin, plus ambiguous-reference handling. Minor gaps remain around how limit truncation interacts with 'strongest first' and whether relation/direction filtering changes the ordering semantics.

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 coverage is 100%, so limit, doc_id, relation, and direction are already documented in the schema. The description reinforces doc_id's provenance ('the id get_docs returns') but adds no meaning to the relation enum values or the direction modes, so it matches the baseline for a fully covered schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a concrete resource and scope: incoming and outgoing links for one document, ordered strongest first. It implicitly separates itself from get_docs by defining doc_id's origin, but never distinguishes itself from trace_document_path or get_graph_stats, so sibling differentiation is only partial.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the get_docs reference (call get_docs first to obtain doc_id), which gives a usable workflow hint. There is no explicit when-to-use versus when-not-to-use guidance, and no mention of when to prefer trace_document_path or get_graph_stats instead.

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