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

Capabilities

Features and capabilities supported by this server

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

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/jcs-mcp'

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