Skip to main content
Glama
TherapyPortal MCP Server

TherapyPortal MCP Server

by chrischall

therapyportal_download_document

Read-only

Download client-completed forms or practice-uploaded files from TherapyPortal using a portal document ID; saves to disk locally or returns base64 bytes.

Instructions

Download a TherapyPortal document as a file, by portal_document_id from therapyportal_list_documents: a form the client completed (rendered to PDF by the portal) or a file the practice uploaded for review. Saves to disk and returns the path on a local install, or returns the bytes inline (base64) on a hosted runner.

Input Schema

NameRequiredDescriptionDefault
destNoFolder to save into (server transport, local install only). Must be inside THERAPYPORTAL_OUTPUT_DIR, or ~/Downloads / ~/Documents when that is unset.
portal_document_idYesportalDocumentId from therapyportal_list_documents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint=true, destructiveHint=false) and openness, but the description adds genuinely new behavior: the return shape changes with the environment — a path on a local install, base64 bytes inline on a hosted runner. That is exactly the kind of context annotations cannot convey. It stops short of noting permissions or document-size/rate limits.

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?

The core action is front-loaded in the first clause and the ID source follows immediately; nothing is redundant. The nested parenthetical and dual-return clause make the single sentence dense, but every piece 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 describing return values and does so precisely (path on local install, base64 inline on hosted runner). Combined with the sibling pointer and full schema coverage on both parameters, an agent has everything needed to invoke it 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%, so both parameters are already documented in structured form, including dest's confinement to THERAPYPORTAL_OUTPUT_DIR. The description only reinforces the portal_document_id provenance and says nothing about dest, so it adds little beyond the schema. 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 TherapyPortal document as a file') and enumerates the two document classes it covers (client-completed forms rendered to PDF, practice-uploaded files). It also names the sibling that supplies the identifier (therapyportal_list_documents), so an agent can separate it from therapyportal_download_receipt without opening either 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?

Explicitly directs the agent to get portal_document_id from therapyportal_list_documents, which is the key prerequisite for calling it. It does not state exclusions (e.g., 'use download_receipt for payment receipts'), so routing is clear but not fully disambiguated.

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