Skip to main content
Glama
nathanfolkman

CUF Health Portal MCP Server

parse_prescription

Extract structured prescription data from a downloaded PDF using a local Ollama model. Handles both text-based and image-based PDFs to return patient, medication, and prescription details.

Instructions

Parse a downloaded prescription PDF with a local Ollama model.

Extracts text from the PDF and sends it to a local Ollama model for structured extraction. Falls back to vision-mode (image rendering) for image-based PDFs.

Args: file_path: Path to the prescription PDF (from get_prescription). model: Ollama model ID to use (default: "llama3.2"; use a vision model like "llava" if the PDF is image-based).

Returns structured dict with: patient, date, doctor, specialty, medications (list with name/dci/strength/form/quantity/posology/duration), prescription_number, notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNollama3.2
file_pathYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the internal process (extract text, send to Ollama, structured extraction) and the vision-mode fallback for image-based PDFs. It also explicitly lists the return structure, which is valuable since there is no output schema. Minor gaps remain, such as error handling or the need for Ollama to be running, but the core behavior is transparent.

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?

The description opens with a concise summary, then uses clear Args and Returns sections. Every sentence earns its place—the workflow context, parameter details, and return fields are all directly useful. There is no redundancy or filler.

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?

Given there is no output schema, the detailed Returns section is essential and fully provided. The description also includes workflow context (downloaded PDF from get_prescription) and the fallback mechanism. It does not mention potential failure modes (e.g., Ollama unavailable, invalid file), but the essential information for invoking and interpreting the tool 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?

The schema only defines file_path as a required string and model as a string with default. The description adds meaning beyond the schema: file_path is the path from get_prescription, and model selection depends on the PDF type (default llama3.2, vision model for image-based PDFs). This gives an agent practical guidance for setting the parameters correctly.

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 ('Parse'), resource ('downloaded prescription PDF'), and method ('local Ollama model'). This clearly distinguishes it from sibling tools like get_prescription and list_prescriptions, which retrieve documents rather than extract structured data. The one-sentence summary is unambiguous and immediately conveys the tool's role.

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 links file_path to 'get_prescription', establishing the intended workflow order. It also gives model-selection guidance, advising a vision model for image-based PDFs. It does not explicitly name alternative tools or state when not to use it, but the context is clear enough for an agent to decide correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nathanfolkman/cuf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server