Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OUTPUT_DIRNoDirectory to save downloaded documents (default: ./downloads)
JCS_PASSWORDNoYour JCS password (optional, if set server auto-logins)
JCS_DEVICE_DTKYesDevice token key obtained from browser network response
JCS_DEVICE_UUIDYesDevice UUID obtained from browser local storage
JCS_PHONE_NUMBERYesYour phone number registered with JCS

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
jcs_loginA

Log in to JCS with phone number (from env) + password.

Only needs to be called once — the session is saved to ~/.jcs_session.json and reused automatically until it expires (~24h).

Returns: {"success": True, "patient_name": "...", "patient_id": "..."}

get_patient_infoB

Return patient profile: Name, Email, patientId, accounts.

list_timelineA

Return the main health feed — exam results, appointment confirmations, docs, etc.

Items have: id, subject, body_preview, msgtype, publish_date, un_read, events[]. Use get_message(id) to fetch full detail + attachment URIs for a specific item.

Args: rows_to_skip: Pagination offset (default 0). archived: Include archived items (default False).

list_notificationsA

Return notifications/messages list. Returns {items, channels}.

Args: rows_to_skip: Pagination offset (default 0). archived: Include archived notifications (default False).

get_messageA

Get full detail for a message/notification by ID.

The response includes the subject, body, linked events (appointments), and attachment URIs. Use get_document_content(uri) or download_document(uri) with any uri values found in the response to access the actual documents.

Args: message_id: Numeric message ID (from list_timeline or list_notifications).

list_appointmentsA

Return upcoming and recent appointments from the calendar.

Each event has: date, time, description, location (clinic), patient name.

list_prescriptionsB

Return prescriptions list.

Args: include_expired: Include expired prescriptions (default False).

list_invoicesA

Return invoices (Faturas) from the patient profile.

Each item contains clinic, invoice number (Fatura/Recibo), date, amount. Use download_document(uri) with the item's attach URI to download the PDF.

get_document_contentA

Fetch the HTML content of a clinical document or exam result.

The uri comes from get_message() response (in events[] or external_ref). Returns: {FileName, contentType, html}

Args: uri: Signed document URI from a message detail response.

download_documentA

Download a clinical document PDF by signed URI. Saves to downloads/jcs/documentos/.

The uri comes from get_message() response.

Args: uri: Signed document URI from a message detail response. filename: Optional filename (e.g. "resultado_patologia.pdf").

Returns: Absolute path to the saved PDF file.

parse_prescriptionA

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 download_document). 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.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 11 tools

Disambiguation3/5

Most tools are clearly distinct, but list_timeline and list_notifications overlap significantly—both return lists of messages with similar arguments and point to get_message for details. Additionally, get_document_content and download_document both handle attachment URIs, which could cause misselection without careful reading.

Naming Consistency4/5

The naming pattern is predominantly verb_noun (get_patient_info, list_appointments, download_document, parse_prescription), which is consistent and predictable. The outlier is jcs_login, which breaks the pattern by using a product prefix and lacking a clear object, introducing minor inconsistency.

Tool Count5/5

With 11 tools, the server is well-scoped for a healthcare portal client. It covers authentication, data retrieval, document access, and a niche parsing feature without being bloated or too thin. Each tool serves a distinct purpose in the overall workflow.

Completeness4/5

The tool surface provides a complete read-only lifecycle for the domain: listing and getting messages, appointments, prescriptions, invoices, and documents. Minor gaps exist, such as no ability to search, mark-as-read, or perform actions like scheduling appointments, but these are not core to the apparent purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues