Skip to main content
Glama

insync_download_document

Read-only

Download a patient portal document by folder URL and file name from listed documents; saves to disk on local installs or returns file bytes inline on hosted servers.

Instructions

Download a document filed to the patient’s portal account. Identify it by the folder_url and file_name from insync_list_documents (full view). On a local install the file is saved to disk and the path returned; on a hosted server the bytes come back inline. The download goes through the portal — never direct storage.

Input Schema

NameRequiredDescriptionDefault
file_nameYesThe document’s FileName from insync_list_documents (full view).
folder_urlYesThe document’s DstFolderURL from insync_list_documents (full view).
output_dirNoDirectory to save into (local install only; ignored on a hosted server, which returns bytes inline). Defaults to INSYNC_OUTPUT_DIR or ~/Downloads; must resolve inside an allowed root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: the outcome differs by deployment (local install writes to disk and returns a path; hosted returns bytes inline), and the transfer is proxied through the portal rather than direct storage. Annotations already cover the read-only/non-destructive profile, so this is meaningful added value; it stops short of covering failure modes such as missing files or permission errors.

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 tight sentences: what it does, how to identify the target, then the return behavior by deployment. Front-loaded and every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 takes on the burden of explaining returns and does so ('path returned' vs 'bytes come back inline'). Combined with the fully documented parameter schema and the read-only annotations, an agent has everything needed to call this correctly.

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%, and the schema already explains DstFolderURL, FileName, and the output_dir fallback/allowed-root rules. The description reinforces the provenance requirement but contributes no parameter detail the schema does not already contain, so baseline 3 applies.

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 ('Download a document filed to the patient's portal account') and scopes it to portal-filed documents rather than any file. An agent can immediately tell this is a document retrieval tool, distinct from list/get-style siblings.

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 a clear prerequisite chain — call insync_list_documents (full view) first and use its folder_url and file_name — which is exactly the context an agent needs before invoking. It does not, however, differentiate from the sibling insync_download_attachment or state when not to use this tool.

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