Skip to main content
Glama

Get Document Links

get_document_links
Read-onlyIdempotent

Get the documents linked to ONE entity (transaction, invoice, bill, estimate, contact, project, expense claim), or the entities linked to ONE document. Every call needs either document_id, or entity_type together with entity_id: there is no "list all links" call, and a call with neither returns nothing but an error. Look the id up first (get_transactions, get_invoices, search_documents), then call once per id. Use when user asks "what documents are attached to this invoice?" or "show me what's linked to that receipt".

Input Schema

NameRequiredDescriptionDefault
companyNoWhich company to read, by name or id, when the account has more than one (see list_companies). Leave it out to use the only company, or the default.
entity_idNoEntity ID to get linked documents for
document_idNoDocument ID to get links for
entity_typeNoEntity type: transaction, invoice, bill, estimate, contact, project, expense_claim

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world call, so the safety profile is covered. The description adds genuinely non-redundant behavior: a call with neither document_id nor entity_type/entity_id errors out rather than returning an empty set, and results are limited to a single entity/document per call. It stops short of describing the link record shape, which is the one remaining gap.

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?

Front-loaded with the core constraint first, then the parameter requirement, then workflow, then example queries. Every sentence carries information; the closing quoted user-phrasings are mildly redundant with the earlier scope statement but aid trigger matching. Somewhat dense as a single paragraph.

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?

There is no output schema, so the description could say more about what a link record contains (target id, type, maybe link kind). Everything needed to call the tool correctly — scope, parameter combination, prerequisite lookup, per-id iteration — is present.

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 the cross-parameter contract the schema omits: either document_id alone, or entity_type together with entity_id, otherwise an error. That is the single most important usage rule for a 0-required-parameter schema and it is stated explicitly. It doesn't clarify the company parameter's defaulting behavior beyond what the schema already says.

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 and precisely defines scope: links in either direction between exactly ONE entity and ONE document. The enumeration of entity types and the explicit 'no list-all links call' makes it distinguishable from broader document tools like search_documents or find_related_documents 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?

Gives concrete when-to-use triggers ('what documents are attached to this invoice?'), a prerequisite workflow ('look the id up first via get_transactions, get_invoices, search_documents'), and an exclusion ('there is no list all links call'). It also tells the caller to invoke once per id, which handles the multi-entity case explicitly.

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