Skip to main content
Glama

oncofiles

Tests Python MCP Claude ChatGPT License

您的医疗记录散落在 Gmail、Google Drive 和日历中。Oncofiles 可以读取并整理所有内容,并通过 AI 提供支持——让您可以在 Claude 或 ChatGPT 中以自然语言询问您的健康状况。

oncofiles.com | 演示仪表板 | 隐私政策

这是什么?

Oncofiles 是一个专为癌症患者及其护理人员构建的 MCP 服务器。它连接到您的 Google Drive、Gmail 和日历,读取您所有的医疗文档(化验结果、CT 扫描、病理报告、处方),并使它们可以通过任何 AI 聊天工具(Claude、ChatGPT 或任何 MCP 客户端)进行访问。

源于真实需求: 由一位正在照顾患癌妻子的护理人员创建。面对数百份文档、数十位医生以及不断变化的化验结果,Oncofiles 整理了这些混乱,让您可以专注于治疗,而不是寻找纸质文件。

姊妹项目: Oncoteam — 一个分析您 Oncofiles 数据的 AI 代理:跟踪化验趋势、搜索临床试验,并为您的肿瘤科医生准备问题。

您的数据,由您掌控: 所有内容都保留在您的 Google Drive 中。没有第三方数据处理。随时断开连接——您的文件永远属于您。

Related MCP server: atlas_mcp

多患者支持 (v4.0+)

Oncofiles 支持在单个实例中管理多名患者。每位患者享有:

  • 完整的数据隔离 — 文档、化验、治疗事件、电子邮件和日历条目均针对患者进行范围限定

  • 独立的承载令牌 (Bearer Tokens) — 每位患者(或护理人员)拥有自己的 onco_* 令牌

  • 按患者 OAuth — Google Drive、Gmail 和日历均按患者进行授权

  • 仪表板患者选择器 — 在 Web 仪表板中切换患者

新患者入驻

  1. 仪表板向导: 打开仪表板,点击“+ 新患者”,并按照 4 步向导操作

  2. API: 使用 {patient_id, display_name} 调用 POST /api/patients — 返回一个承载令牌

  3. 连接 GDrive: 访问 /oauth/authorize/drive?patient_id=X 以授权文档同步

  4. 触发首次同步: 使用 {patient_id} 调用 POST /api/sync-trigger 以导入文档

功能特性

  • 76 个 MCP 工具,涵盖 14 个模块,实现全面的医疗数据管理

  • 14 类文档分类 — 化验、病理、影像、遗传学、手术、咨询、处方等

  • 化验值跟踪 — 存储数值、跟踪趋势、化疗方案的周期前安全检查

  • Google Drive 同步 — 双向同步,并带有自动 OCR 配套文件

  • Gmail 和日历扫描 — 自动检测并分类医疗邮件和预约

  • 临床研究 — 搜索 PubMed 和 ClinicalTrials.gov,记录研究决策

  • 治疗时间轴 — 跟踪化疗周期、手术及其他治疗事件

  • 文档版本控制 — 通过完整历史记录跟踪文档修订

  • AI 驱动的元数据 — 自动摘要、标签和结构化数据提取

  • 审计日志 — 记录每一次工具调用以确保可追溯性

架构

┌─────────────────┐     MCP Protocol      ┌──────────────┐
│  Claude / GPT   │◄────────────────────►  │  Oncofiles   │
│  (AI Assistant)  │    streamable-http     │  MCP Server  │
└─────────────────┘                        └──────┬───────┘
                                                  │
                                    ┌─────────────┼─────────────┐
                                    │             │             │
                              ┌─────▼─────┐ ┌────▼────┐ ┌─────▼─────┐
                              │  SQLite /  │ │ Google  │ │ Anthropic │
                              │   Turso    │ │  Drive  │ │ Files API │
                              └───────────┘ └─────────┘ └───────────┘

技术栈: Python 3.12+ · FastMCP 3.1 · Pydantic · SQLite/Turso · Railway

快速入门

# Clone and install
git clone https://github.com/peter-fusek/oncofiles.git
cd oncofiles
uv sync --extra dev

# Run locally (stdio mode for Claude Desktop)
uv run oncofiles-mcp

# Run tests
uv run pytest

# Lint
uv run ruff check

环境变量

# Required
DATABASE_PATH=data/oncofiles.db

# Optional — cloud database
TURSO_DATABASE_URL=libsql://...
TURSO_AUTH_TOKEN=...

# Optional — Google Drive sync
GOOGLE_DRIVE_FOLDER_ID=...
GOOGLE_OAUTH_CLIENT_ID=...
GOOGLE_OAUTH_CLIENT_SECRET=...

# Optional — remote access
MCP_TRANSPORT=streamable-http  # default: stdio
MCP_HOST=0.0.0.0
MCP_PORT=8080
MCP_BEARER_TOKEN=...

连接到 Claude Desktop

添加到您的 Claude Desktop 配置 (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "oncofiles": {
      "command": "uv",
      "args": ["run", "oncofiles-mcp"],
      "cwd": "/path/to/oncofiles"
    }
  }
}

连接到 ChatGPT

Oncofiles 支持 ChatGPT 的 MCP 集成(开发者模式)。将 ChatGPT 指向您实例的 /mcp 端点并提供承载令牌。

部署到 Railway

随附的 Dockerfile 已为 Railway 部署做好准备:

  1. 推送到 GitHub

  2. 在 Railway 中连接仓库

  3. 设置环境变量

  4. Railway 在推送时自动部署

实时实例:oncofiles.com

项目结构

src/oncofiles/
├── server.py           # FastMCP server, auth, routes, scheduler
├── database/           # Mixin-based DB layer (SQLite/Turso)
├── tools/              # 14 tool modules (76 tools)
│   ├── documents.py    # CRUD, search, view, versioning
│   ├── lab_trends.py   # Lab values, trends, safety checks
│   ├── clinical.py     # Treatment events, research log
│   ├── research.py     # PubMed, ClinicalTrials.gov search
│   └── ...
├── sync.py             # Bidirectional Google Drive sync
├── gmail_sync.py       # Medical email detection and import
├── calendar_sync.py    # Calendar event classification
├── enhance.py          # AI metadata extraction (Haiku)
├── patient_middleware.py # Per-patient token → context resolution
├── patient_context.py  # Patient clinical profile
└── models.py           # Pydantic models

MCP 注册表

已在 MCP Registry 中列出,名称为 io.github.peter-fusek/oncofiles。

贡献

请参阅 CONTRIBUTING.md 获取指南。

许可证

MIT


幕后团队

核心成员

Peter Fusek — 首席执行官兼创始人

连续创业者和 AI 战略家。曾在 Tatra banka 工作 4 年。联合创立了 marketlocator(已出售给德国电信)。VÚB 银行首席执行官顾问。拥有 18 年以上构建技术产品的经验。

出于个人需求构建了 Oncofiles — 管理他妻子在数百份文档、数十位医生和不断变化的化验结果中的癌症治疗过程。

LinkedIn · peter.fusek@instarea.com

Peter Čapkovič — 首席技术官兼联合创始人

资深 IT 架构师,在企业银行 (VÚB) 拥有 20 多年经验。精通 .NET、Python、SQL 和系统架构。领导了所有 Instarea 产品的架构设计。

架构、开发、运营 — 一站式全包。

LinkedIn

公司简介

Instarea — 成立 18 年,已发布 23 款产品。从电信分析和企业客户 (Callinspector) 到移动优先金融科技 (InventButton)、大数据退出项目 (marketlocator → 德国电信)、物联网平台以及 AI 优先产品 (PulseShape, ReplicaCity, HomeGrif)。

Oncofiles 和 Oncoteam 是 Instarea 的最新力作 — 采用与交付银行、电信和数据行业企业级产品相同的工程准则构建。

拥有 10 多名经过验证的同步团队成员,涵盖前端、后端、集成、数据科学、UX/UI、市场营销和云运营。

“我们亲力亲为,以诚相待,如同家人,亦如工作。”

由 Instarea 构建 | 符合 EHDS 原则

Available Tools

79 tools
add_activity_logAInspect

Log an agent tool call to the activity audit trail (append-only).

Args: session_id: Session identifier. agent_id: Agent that made the call (e.g. oncoteam). tool_name: Name of the tool that was called. input_summary: Brief summary of the input parameters. output_summary: Brief summary of the output. duration_ms: How long the call took in milliseconds. status: Result status (ok, error, timeout). error_message: Error details if status is not ok. tags: JSON array of tags (e.g. '["research","pubmed"]').

NameRequiredDescriptionDefault
session_idYes
agent_idYes
tool_nameYes
input_summaryNo
output_summaryNo
duration_msNo
statusNook
error_messageNo
tagsNo[]

Output Schema

NameRequiredDescription
resultYes
add_research_entryAInspect

Save a research article or clinical trial found by an agent.

Deduplicates by source+external_id — if a duplicate is found, returns the existing entry without error.

Args: source: Source name (e.g. pubmed, clinicaltrials). external_id: External identifier (e.g. PMID, NCT number). title: Article or trial title. summary: Brief summary or abstract excerpt. tags: JSON array of tags (e.g. '["FOLFOX","mCRC"]'). raw_data: Full raw data (abstract, JSON, etc.) for reference.

NameRequiredDescriptionDefault
sourceYes
external_idYes
titleYes
summaryNo
tagsNo[]
raw_dataNo

Output Schema

NameRequiredDescription
resultYes
add_treatment_eventAInspect

Record a treatment milestone (chemo cycle, surgery, scan result, etc.).

Args: event_date: Date of the event (YYYY-MM-DD). event_type: Type of event (e.g. chemo, surgery, scan, consult, side_effect). title: Short title for the event. notes: Optional longer description or notes. metadata: Optional JSON string with extra structured data.

NameRequiredDescriptionDefault
event_dateYes
event_typeYes
titleYes
notesNo
metadataNo{}

Output Schema

NameRequiredDescription
resultYes
analyze_labsAInspect

Analyze recent lab results with oncology context.

Downloads lab documents and returns them inline for Claude to read, along with patient context for interpreting results under chemotherapy.

Note: Each lab document is 100KB-2MB. Keep limit low to avoid large responses.

Args: file_id: Specific lab file_id to analyze. If omitted, fetches the most recent labs. limit: Maximum number of lab documents to include (default 3).

NameRequiredDescriptionDefault
file_idNo
limitNo
calendar_auth_enableAInspect

Start Calendar authorization flow. Returns a URL the user must visit.

After visiting the URL and completing Google's consent screen, Calendar read access will be enabled. Call integration_status() to verify.

WARNING: This grants read access to ALL events in Google Calendar.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
compare_lab_panelsAInspect

Compare lab values between two dates side-by-side.

Returns all parameters measured on both dates with change direction, absolute delta, percentage change, and out-of-range flags.

Args: date_a: First date (YYYY-MM-DD), typically the earlier measurement. date_b: Second date (YYYY-MM-DD), typically the later measurement.

NameRequiredDescriptionDefault
date_aYes
date_bYes

Output Schema

NameRequiredDescription
resultYes
compare_labsAInspect

Compare lab results over time to identify trends.

Two modes:

  • Specific: provide file_id_a and file_id_b to compare two specific lab sets.

  • Date range: provide date_from/date_to to compare all labs in a period.

Note: Each lab document is 100KB-2MB. Keep limit reasonable.

Args: file_id_a: First lab file_id (optional). file_id_b: Second lab file_id (optional). date_from: Start date for range query (YYYY-MM-DD). date_to: End date for range query (YYYY-MM-DD). limit: Maximum number of lab documents to include (default 10).

NameRequiredDescriptionDefault
file_id_aNo
file_id_bNo
date_fromNo
date_toNo
limitNo
delete_documentAInspect

Soft-delete a document (moves to trash, recoverable for 30 days).

The document is hidden from all listings and searches but can be restored using restore_document. Files API copy is also deleted.

Args: file_id: The Anthropic Files API file_id to delete.

NameRequiredDescriptionDefault
file_idYes

Output Schema

NameRequiredDescription
resultYes
delete_treatment_eventBInspect

Delete a treatment event by ID. Use for removing contaminated/test data.

Args: event_id: The treatment event ID to delete.

NameRequiredDescriptionDefault
event_idYes

Output Schema

NameRequiredDescription
resultYes
enhance_documentsAInspect

Run AI enhancement (summary + tags) on documents.

If document_ids is omitted, processes all documents that haven't been enhanced yet.

Args: document_ids: Comma-separated document IDs to enhance. If omitted, enhances all unprocessed.

NameRequiredDescriptionDefault
document_idsNo

Output Schema

NameRequiredDescription
resultYes
export_document_packageAInspect

Export a structured document package for consultations or second opinions.

Assembles all documents grouped by category with metadata, treatment events timeline, and structured metadata. Returns JSON that Oncoteam can render as PDF, email, or share link.

Args: include_metadata: Include AI summaries and structured metadata (default True). include_timeline: Include treatment events timeline (default True).

NameRequiredDescriptionDefault
include_metadataNo
include_timelineNo

Output Schema

NameRequiredDescription
resultYes
export_manifestBInspect

Export the full database as a JSON manifest (on-demand).

Returns the manifest JSON with all documents, conversations, treatment events, research entries, and agent state.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
extract_all_metadataAInspect

Backfill structured_metadata for all documents that have AI summaries but no metadata.

Scans for documents where ai_processed_at is set but structured_metadata is empty, then extracts structured metadata from cached OCR text. Useful after adding the structured_metadata column to an existing database.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
extract_document_metadataAInspect

Extract and store structured medical metadata from a document.

Uses AI to analyze the document text and extract findings, diagnoses, medications, providers, and a patient-friendly summary. Results are persisted in the structured_metadata column.

Args: document_id: The local document ID to extract metadata from.

NameRequiredDescriptionDefault
document_idYes

Output Schema

NameRequiredDescription
resultYes
fetch_clinical_trialsAInspect

Fetch clinical trials from ClinicalTrials.gov and store in research_entries.

Searches the ClinicalTrials.gov API v2 for matching studies and saves them to the research_entries table (deduplicates by NCT number).

Args: condition: Medical condition to search for (e.g. "colorectal cancer"). keywords: Additional search terms (e.g. "FOLFOX", "immunotherapy"). status: Trial status filter (RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED). location_country: Country filter (e.g. "United States", "Slovakia"). phase: Phase filter (PHASE1, PHASE2, PHASE3, PHASE4). limit: Maximum number of trials to fetch (default 20).

NameRequiredDescriptionDefault
conditionYes
keywordsNo
statusNoRECRUITING
location_countryNo
phaseNo
limitNo

Output Schema

NameRequiredDescription
resultYes
find_duplicatesAInspect

Detect potential duplicate documents based on original filename and file size.

Returns groups of documents that share the same original_filename + size_bytes. Each group contains 2+ documents. Useful for cleanup after repeated imports.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
gdrive_auth_callbackAInspect

Exchange an OAuth authorization code for tokens and store them.

Args: code: The authorization code from the Google OAuth redirect.

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescription
resultYes
gdrive_auth_statusAInspect

Check if the user has valid Google Drive OAuth tokens.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
gdrive_auth_urlAInspect

Get the Google OAuth authorization URL for the user to visit.

Returns a URL that the user should open in their browser to authorize Google Drive access. After authorization, Google redirects to the callback URL which stores the tokens automatically.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
gdrive_fix_permissionsAInspect

Grant writer access to all files/folders in the sync root (one-off fix).

Use this after initial sync when files were created by the service account and are invisible to the folder owner. Also updates the stored owner_email for automatic sharing on future uploads.

Args: email: Email to grant access to. If omitted, detects from folder owner.

NameRequiredDescriptionDefault
emailNo

Output Schema

NameRequiredDescription
resultYes
gdrive_set_folderBInspect

Set the Google Drive folder to sync with.

Detects the folder owner's email and stores it for automatic permission sharing. When the service account creates files/folders, it grants writer access to the original folder owner so they can see the files.

Args: folder_id: The Google Drive folder ID to use as the sync root.

NameRequiredDescriptionDefault
folder_idYes

Output Schema

NameRequiredDescription
resultYes
gdrive_syncAInspect

Run full bidirectional Google Drive sync (runs in background).

Returns immediately with status. Use gdrive_sync_status to check progress and get the result when done.

  1. Imports new/changed files from GDrive (GDrive wins on conflicts)

  2. Exports documents to organized category/year-month folders

  3. Exports manifest + metadata markdown files

Args: dry_run: Preview changes without syncing. enhance: Run AI summary/tag generation on new files (default True).

NameRequiredDescriptionDefault
dry_runNo
enhanceNo

Output Schema

NameRequiredDescription
resultYes
gdrive_sync_statusAInspect

Check the status of the last or current GDrive sync.

Returns whether a sync is currently running, and the result of the last completed sync (if any).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
get_activity_statsBInspect

Get aggregated activity statistics by tool and status.

Args: session_id: Filter by session. agent_id: Filter by agent. date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD).

NameRequiredDescriptionDefault
session_idNo
agent_idNo
date_fromNo
date_toNo

Output Schema

NameRequiredDescription
resultYes
get_agent_stateAInspect

Get a persistent state value by key.

Returns {value: null} if the key does not exist.

Args: key: State key name. agent_id: Agent identifier (default: oncoteam).

NameRequiredDescriptionDefault
keyYes
agent_idNooncoteam

Output Schema

NameRequiredDescription
resultYes
get_calendar_eventBInspect

Get full details of a stored calendar entry by ID.

Args: calendar_entry_id: The calendar entry ID.

NameRequiredDescriptionDefault
calendar_entry_idYes

Output Schema

NameRequiredDescription
resultYes
get_conversationBInspect

Get the full content of a single conversation entry by ID.

Args: entry_id: The conversation entry ID.

NameRequiredDescriptionDefault
entry_idYes

Output Schema

NameRequiredDescription
resultYes
get_documentAInspect

Get a document's metadata and file_id for Claude to analyze.

Returns the file_id that can be used to reference the document in conversation.

Args: file_id: The Anthropic Files API file_id.

NameRequiredDescriptionDefault
file_idYes

Output Schema

NameRequiredDescription
resultYes
get_document_by_idAInspect

Get a document's metadata by its integer database ID.

Use this when you have the numeric document ID (e.g. from search results or lab values).

Args: doc_id: The integer database ID of the document.

NameRequiredDescriptionDefault
doc_idYes

Output Schema

NameRequiredDescription
resultYes
get_document_status_matrixAInspect

Get per-document status matrix showing OCR, AI, metadata, sync, and rename state.

Returns a table of documents with their processing status at each pipeline stage. Use filters to find documents that need attention.

Args: filter: Filter documents — 'all', 'missing_ocr', 'missing_ai', 'missing_metadata', 'not_synced', 'not_renamed', 'incomplete' (any gap). limit: Maximum documents to return (max 200).

NameRequiredDescriptionDefault
filterNoall
limitNo

Output Schema

NameRequiredDescription
resultYes
get_document_versionsAInspect

Get the version history chain for a document.

Returns all versions (current and previous) ordered newest first. Works with any document ID in the chain — will find the full history.

Args: doc_id: The integer database ID of any document in the version chain.

NameRequiredDescriptionDefault
doc_idYes

Output Schema

NameRequiredDescription
resultYes
get_emailCInspect

Get full details of a stored email entry by ID.

Args: email_entry_id: The email entry ID.

NameRequiredDescriptionDefault
email_entry_idYes

Output Schema

NameRequiredDescription
resultYes
get_journey_timelineAInspect

Get a unified chronological timeline merging documents and conversation entries.

This is the complete view of the oncology journey — documents and diary entries interleaved by date. Useful for book writing, doctor sharing, or reviewing history.

Args: date_from: Start date (YYYY-MM-DD). date_to: End date (YYYY-MM-DD). limit: Maximum items per type (default 200).

NameRequiredDescriptionDefault
date_fromNo
date_toNo
limitNo

Output Schema

NameRequiredDescription
resultYes
get_lab_safety_checkAInspect

Lab safety check against thresholds appropriate for the patient type.

For oncology patients: mFOLFOX6 pre-cycle thresholds (NCCN + SmPC). For general patients: standard health reference ranges (EU/WHO/ESC).

For each safety parameter, returns:

  • The threshold (min or max) with source/guideline reference

  • The patient's most recent value with date and source document

  • Safety status: green (safe), red (unsafe), yellow (borderline ±10%)

  • Clickable gdrive_url to verify the source lab document

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
get_lab_summaryAInspect

Get a summary of the latest value for every tracked lab parameter.

Returns status (normal/high/low), trend direction (rising/falling/stable), days since last measurement, and computed indices (SII, Ne/Ly ratio). Designed as a quick overview for clinical decision support.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
get_lab_time_seriesAInspect

Get structured time series data for one or more lab parameters.

Returns chronological values with reference ranges, units, and computed deltas (absolute change and % change between consecutive measurements). Designed for Oncoteam and MCP clients to build trend charts and analysis.

Args: parameters: Comma-separated parameter names (e.g. "CEA,CA19_9" or "PLT"). date_from: Start date filter (YYYY-MM-DD). Optional. date_to: End date filter (YYYY-MM-DD). Optional.

NameRequiredDescriptionDefault
parametersYes
date_fromNo
date_toNo

Output Schema

NameRequiredDescription
resultYes
get_patient_contextBInspect

Get the current patient clinical context.

Returns structured patient data including diagnosis, biomarkers, treatment, metastases, comorbidities, and excluded therapies.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
get_pipeline_statusAInspect

Get pipeline operations status: scheduled jobs, stage counts, and sync history.

Shows which automated processes run, their schedule, last results, and how many documents are at each pipeline stage (OCR → AI → metadata → sync → rename).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
get_precycle_checklistAInspect

Get the full pre-cycle checklist for mFOLFOX6 with source references.

Returns all checklist sections (lab safety, toxicity, VTE, general) with guideline source URLs for each item. Lab items include the patient's latest value and safety status.

Args: cycle_number: Current cycle number (for display context).

NameRequiredDescriptionDefault
cycle_numberNo

Output Schema

NameRequiredDescription
resultYes
get_preventive_care_statusAInspect

Get EU preventive care screening compliance for a general health patient.

Evaluates which screenings (colonoscopy, dental, ophthalmology, PSA, etc.) are up-to-date, due soon, overdue, or never done — based on patient age, sex, and treatment_events history.

Only available for patients with patient_type="general" in their context. Requires date_of_birth and sex in patient context.

Returns a compliance report with actionable screening status for each applicable protocol.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
get_prompt_log_entryAInspect

Get a single prompt log entry with full prompts and raw response.

Returns the complete AI call record including system prompt, user prompt, raw AI response, token counts, and timing. Use search_prompt_log to find entries.

Args: entry_id: The prompt log entry ID.

NameRequiredDescriptionDefault
entry_idYes

Output Schema

NameRequiredDescription
resultYes
get_treatment_eventCInspect

Get full details of a treatment event by ID.

Args: event_id: The treatment event ID.

NameRequiredDescriptionDefault
event_idYes

Output Schema

NameRequiredDescription
resultYes
gmail_auth_enableAInspect

Start Gmail authorization flow. Returns a URL the user must visit.

After visiting the URL and completing Google's consent screen, Gmail read access will be enabled. Call integration_status() to verify.

WARNING: This grants read access to ALL emails in the Gmail account.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
integration_statusBInspect

Show which Google services are connected and entry counts.

Returns the status of Drive, Gmail, and Calendar integrations, including whether each is authorized and how many entries are stored.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
list_agent_statesBInspect

List all persistent state keys for an agent.

Args: agent_id: Agent identifier (default: oncoteam). limit: Maximum number of states to return (default 100, max 500).

NameRequiredDescriptionDefault
agent_idNooncoteam
limitNo

Output Schema

NameRequiredDescription
resultYes
list_documentsBInspect

List all stored medical documents with metadata.

Returns documents ordered by date (newest first).

NameRequiredDescriptionDefault
limitNo
offsetNo

Output Schema

NameRequiredDescription
resultYes
list_patientsAInspect

List all available patients.

Shows active patients with their slug, name, document count, and patient type. Use select_patient to switch to a different patient.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
list_research_entriesCInspect

List saved research entries, optionally filtered by source.

Args: source: Filter by source (e.g. pubmed, clinicaltrials). limit: Maximum results to return.

NameRequiredDescriptionDefault
sourceNo
limitNo

Output Schema

NameRequiredDescription
resultYes
list_tool_definitionsAInspect

List all registered MCP tools with their descriptions and parameter schemas.

Returns the complete tool inventory for discovery and documentation. Useful for agents to understand available capabilities.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
list_trashAInspect

List soft-deleted documents in trash.

Args: limit: Maximum results to return (default 50, max 200).

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescription
resultYes
list_treatment_eventsAInspect

List treatment events, optionally filtered by type and date range.

Returns events in reverse chronological order.

Args: event_type: Filter by event type (e.g. chemo, surgery). date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD). limit: Maximum results to return.

NameRequiredDescriptionDefault
event_typeNo
date_fromNo
date_toNo
limitNo

Output Schema

NameRequiredDescription
resultYes
log_conversationAInspect

Save a diary entry to the conversation archive.

Use this to log summaries, decisions, progress notes, questions, or any narrative content from conversations about the oncology journey.

Args: title: Short title for the entry. content: Markdown body with the full entry text. entry_date: Date the entry is about (YYYY-MM-DD). Defaults to today. entry_type: Type of entry: summary, decision, progress, question, note. tags: Comma-separated tags (e.g. "chemo,FOLFOX,cycle-3"). document_ids: Comma-separated document IDs referenced (e.g. "3,15"). participant: Who created this: claude.ai, claude-code, oncoteam.

NameRequiredDescriptionDefault
titleYes
contentYes
entry_dateNo
entry_typeNonote
tagsNo
document_idsNo
participantNoclaude.ai

Output Schema

NameRequiredDescription
resultYes
qa_analysisBInspect

Analyze activity logs for errors, slow tools, and improvement opportunities.

Scans the audit trail for patterns: recurring errors, slow operations, failed storage, and usage trends. Returns actionable findings that can be used to create GitHub improvement issues.

Args: days: Number of days to analyze (default 7).

NameRequiredDescriptionDefault
daysNo

Output Schema

NameRequiredDescription
resultYes
query_dbAInspect

Run a read-only SQL query against the production database.

Use this for monitoring, debugging, and ad-hoc analysis. Only SELECT/WITH queries are allowed — mutations are blocked.

Args: sql: SQL query (SELECT only). Tables: documents, activity_log, conversations, treatment_events, research_entries, lab_values, document_pages, agent_state, patient_context, schema_migrations. limit: Max rows to return (default 50, max 200).

NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

NameRequiredDescription
resultYes
reconcile_gdriveAInspect

Detect and fix GDrive folder structure issues.

Scans for: unknown folders, root-level files not in any category folder, empty managed folders, and stale backup folders.

Args: dry_run: If True (default), report issues without making changes. If False, move files, rename folders, and clean up backups.

NameRequiredDescriptionDefault
dry_runNo

Output Schema

NameRequiredDescription
resultYes
rename_documents_to_standardAInspect

Rename documents from old naming conventions to the standard format.

Standard format: YYYYMMDD_PatientName_Institution_Category_DescriptionEN.ext

In dry_run mode (default), returns a preview of proposed renames without making any changes. Set dry_run=False to execute the rename.

Args: dry_run: If True (default), only preview changes. Set False to execute. en_descriptions: Optional JSON object mapping doc_id → English description (e.g. '{"15": "BloodResultsPreCycle3", "42": "CTAbdomen"}'). If not provided, keeps existing descriptions.

NameRequiredDescriptionDefault
dry_runNo
en_descriptionsNo

Output Schema

NameRequiredDescription
resultYes
restore_documentBInspect

Restore a soft-deleted document from trash.

Args: doc_id: The local document ID to restore.

NameRequiredDescriptionDefault
doc_idYes

Output Schema

NameRequiredDescription
resultYes
search_activity_logBInspect

Search the activity log with filters.

Args: session_id: Filter by session. agent_id: Filter by agent. tool_name: Filter by tool name. status: Filter by status (ok, error, timeout). date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD). text: Search in input/output summaries. limit: Maximum results to return.

NameRequiredDescriptionDefault
session_idNo
agent_idNo
tool_nameNo
statusNo
date_fromNo
date_toNo
textNo
limitNo

Output Schema

NameRequiredDescription
resultYes
search_calendar_eventsBInspect

Search stored calendar entries by text, date, or medical relevance.

Args: query: Text to search in summary and description. date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD). is_medical: Filter to medical events only when True. limit: Maximum results to return.

NameRequiredDescriptionDefault
queryNo
date_fromNo
date_toNo
is_medicalNo
limitNo

Output Schema

NameRequiredDescription
resultYes
search_conversationsAInspect

Search the conversation archive by text, type, date, or tags.

Returns entries with truncated content (500 chars). Use get_conversation for full text of a specific entry.

Args: text: Full-text search query. entry_type: Filter by type: summary, decision, progress, question, note. participant: Filter by participant: claude.ai, claude-code, oncoteam. date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD). tags: Comma-separated tags to filter by (all must match). limit: Maximum results to return.

NameRequiredDescriptionDefault
textNo
entry_typeNo
participantNo
date_fromNo
date_toNo
tagsNo
limitNo

Output Schema

NameRequiredDescription
resultYes
search_documentsAInspect

Search medical documents by text, institution, category, or date range.

Multi-term queries (e.g. "CEA labs") use AND semantics — all terms must match somewhere. Results are ranked by relevance when text is provided: filename/description matches rank highest, then AI summaries, then tags.

Args: text: Search query (searches filename, institution, description, AI summary, tags, and structured metadata). Multiple words are AND-ed together. institution: Filter by institution code (e.g. NOUonko, OUSA). category: Filter by category (labs, report, imaging, pathology, genetics, surgery, surgical_report, prescription, referral, discharge, discharge_summary, chemo_sheet, vaccination, dental, preventive, other). date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD). limit: Maximum results to return (max 200). offset: Skip this many results (for pagination).

NameRequiredDescriptionDefault
textNo
institutionNo
categoryNo
date_fromNo
date_toNo
limitNo
offsetNo

Output Schema

NameRequiredDescription
resultYes
search_emailsAInspect

Search stored email entries by text, date, sender, or medical relevance.

Args: query: Text to search in subject, body snippet, and sender. date_from: Filter from this date (YYYY-MM-DD). date_to: Filter to this date (YYYY-MM-DD). sender: Filter by sender email or name (partial match). is_medical: Filter to medical emails only when True. limit: Maximum results to return.

NameRequiredDescriptionDefault
queryNo
date_fromNo
date_toNo
senderNo
is_medicalNo
limitNo

Output Schema

NameRequiredDescription
resultYes
search_prompt_logAInspect

Search prompt logs — all AI calls made during document processing.

Returns a list of prompt log entries (without full prompts for brevity). Use get_prompt_log_entry to see full prompts and responses for a specific entry.

Args: call_type: Filter by type: 'ocr', 'summary_tags', 'structured_metadata', 'filename_description'. document_id: Filter by document ID. status: Filter by status ('ok' or 'error'). date_from: Filter from date (YYYY-MM-DD). date_to: Filter to date (YYYY-MM-DD). text: Search in prompts and responses. limit: Max results (1-200, default 50).

NameRequiredDescriptionDefault
call_typeNo
document_idNo
statusNo
date_fromNo
date_toNo
textNo
limitNo

Output Schema

NameRequiredDescription
resultYes
search_researchBInspect

Search saved research entries by text and/or source.

Args: text: Search in title, summary, and tags. source: Filter by source (e.g. pubmed, clinicaltrials). limit: Maximum results to return.

NameRequiredDescriptionDefault
textNo
sourceNo
limitNo

Output Schema

NameRequiredDescription
resultYes
select_patientAInspect

Switch to a different patient for this connection.

After calling this, all subsequent tool calls will use the selected patient's data. The selection persists across requests.

Args: patient_slug: Patient slug or UUID (e.g. 'q1b', 'e5g').

NameRequiredDescriptionDefault
patient_slugYes

Output Schema

NameRequiredDescription
resultYes
set_agent_stateAInspect

Set a persistent key-value pair for an agent.

Upserts: creates the key if new, updates if it already exists.

Args: key: State key name (e.g. "last_briefing_date", "treatment_protocol"). value: JSON string value to store. agent_id: Agent identifier (default: oncoteam).

NameRequiredDescriptionDefault
keyYes
valueYes
agent_idNooncoteam

Output Schema

NameRequiredDescription
resultYes
setup_gdriveAInspect

Create the folder structure in a GDrive root folder (patient-type-aware).

Idempotent: checks for existing folders by name before creating. Handles both bilingual and legacy EN-only folder names (renames old to bilingual). Oncology patients skip general-only folders; general patients skip oncology-only.

Args: root_folder_id: The Google Drive folder ID to create subfolders in.

NameRequiredDescriptionDefault
root_folder_idYes

Output Schema

NameRequiredDescription
resultYes
store_lab_valuesAInspect

Store parsed lab values from a document for trend tracking.

Includes deduplication checks:

  • If document_id already has stored values, returns skipped (unless force=True to update/replace).

  • If another document has values for the same lab_date, warns about collision (stores anyway but flags it).

Standardized parameter names: WBC, ABS_NEUT, ABS_LYMPH, PLT, HGB, ANC, ALT, AST, GMT, ALP, BILIRUBIN, CREATININE, eGFR, CEA, CA19_9, SII, NE_LY_RATIO

Args: document_id: Source document ID (should be a labs document). lab_date: Date of the lab test (YYYY-MM-DD). values: JSON array of objects, each with: parameter, value, unit, and optionally reference_low, reference_high, flag. Example: [{"parameter": "WBC", "value": 6.8, "unit": "10^9/L", "reference_low": 4.0, "reference_high": 10.0, "flag": ""}] force: If True, store even if document already has values (replaces existing via INSERT OR REPLACE).

NameRequiredDescriptionDefault
document_idYes
lab_dateYes
valuesYes
forceNo

Output Schema

NameRequiredDescription
resultYes
sync_from_gdriveAInspect

Import files from Google Drive into oncofiles.

Walks category/year-month subfolders, detects new and changed files, downloads them, uploads to Files API, and stores metadata.

Args: dry_run: Preview changes without importing. enhance: Run AI summary/tag generation on new/changed files (default True).

NameRequiredDescriptionDefault
dry_runNo
enhanceNo

Output Schema

NameRequiredDescription
resultYes
sync_to_gdriveAInspect

Export documents from oncofiles to Google Drive.

Uploads documents to organized category/year-month folders with manifest and metadata markdown files.

Args: dry_run: Preview changes without exporting.

NameRequiredDescriptionDefault
dry_runNo

Output Schema

NameRequiredDescription
resultYes
system_healthAInspect

Get system health overview: sync history, document counts, resource usage, and errors.

Returns a comprehensive status report useful for monitoring and debugging. Includes 7-day sync statistics, recent sync runs, memory usage, and document counts.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes
update_document_categoryAInspect

Update the category of a document.

Use this to recategorize documents (e.g. from 'other' to 'reference').

Args: doc_id: The integer database ID of the document. category: New category (labs, report, imaging, pathology, genetics, surgery, surgical_report, prescription, referral, discharge, discharge_summary, chemo_sheet, vaccination, dental, preventive, reference, advocate, other).

NameRequiredDescriptionDefault
doc_idYes
categoryYes

Output Schema

NameRequiredDescription
resultYes
update_patient_contextBInspect

Update specific fields in the patient clinical context.

Merges the provided updates into the current context. Nested dicts (like biomarkers, treatment, physicians) are merged recursively. Persisted to database for durability.

Args: updates_json: JSON object with fields to update. Example: '{"treatment": {"current_cycle": 3}}'

NameRequiredDescriptionDefault
updates_jsonYes

Output Schema

NameRequiredDescription
resultYes
update_treatment_eventBInspect

Update a treatment event's title, notes, or metadata.

Args: event_id: The treatment event ID to update. title: New title (optional). notes: New notes (optional). metadata: New metadata JSON string (optional).

NameRequiredDescriptionDefault
event_idYes
titleNo
notesNo
metadataNo

Output Schema

NameRequiredDescription
resultYes
upload_documentAInspect

Upload a medical document to persistent storage.

The filename should follow the standard convention: YYYYMMDD_PatientName_Institution_Category_DescriptionEN.ext (e.g. 20260227_PatientName_NOU_Labs_BloodResultsBeforeCycle2.pdf)

Legacy formats (space+dash, underscore-separated) are also accepted and auto-parsed. Separators: underscores only. Description: English, CamelCase.

Args: content: Base64-encoded file content. filename: Document filename in standard or legacy format. mime_type: MIME type of the document.

NameRequiredDescriptionDefault
contentYes
filenameYes
mime_typeNoapplication/pdf

Output Schema

NameRequiredDescription
resultYes
validate_categoriesAInspect

Validate and fix document categories by comparing with AI-detected document types.

Checks each document's category against its structured_metadata.document_type. Reports mismatches and optionally corrects them.

Args: dry_run: If True (default), report mismatches without fixing. If False, update categories and move GDrive files.

NameRequiredDescriptionDefault
dry_runNo

Output Schema

NameRequiredDescription
resultYes
view_documentAInspect

Download a document and return its content for Claude to read.

Returns the actual file content (image or PDF) inline so Claude can see and analyze it directly.

Args: file_id: The Anthropic Files API file_id.

NameRequiredDescriptionDefault
file_idYes

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 79 tool updatesv5.3.1
    • First observedadd_activity_log
    • First observedadd_research_entry
    • First observedadd_treatment_event
    • First observedanalyze_labs
    • First observedcalendar_auth_enable
    • First observedcompare_lab_panels
    • First observedcompare_labs
    • First observeddelete_document
    • First observeddelete_treatment_event
    • First observedenhance_documents
    • First observedexport_document_package
    • First observedexport_manifest
    • First observedextract_all_metadata
    • First observedextract_document_metadata
    • First observedfetch_clinical_trials
    • First observedfind_duplicates
    • First observedgdrive_auth_callback
    • First observedgdrive_auth_status
    • First observedgdrive_auth_url
    • First observedgdrive_fix_permissions
    • First observedgdrive_set_folder
    • First observedgdrive_sync
    • First observedgdrive_sync_status
    • First observedget_activity_stats
    • First observedget_agent_state
    • First observedget_calendar_event
    • First observedget_conversation
    • First observedget_document
    • First observedget_document_by_id
    • First observedget_document_status_matrix
    • First observedget_document_versions
    • First observedget_email
    • First observedget_journey_timeline
    • First observedget_lab_safety_check
    • First observedget_lab_summary
    • First observedget_lab_time_series
    • First observedget_lab_trends
    • First observedget_patient_context
    • First observedget_pipeline_status
    • First observedget_precycle_checklist
    • First observedget_preventive_care_status
    • First observedget_prompt_log_entry
    • First observedget_related_documents
    • First observedget_treatment_event
    • First observedgmail_auth_enable
    • First observedintegration_status
    • First observedlist_agent_states
    • First observedlist_documents
    • First observedlist_patients
    • First observedlist_research_entries
    • First observedlist_tool_definitions
    • First observedlist_trash
    • First observedlist_treatment_events
    • First observedlog_conversation
    • First observedqa_analysis
    • First observedquery_db
    • First observedreconcile_gdrive
    • First observedrename_documents_to_standard
    • First observedrestore_document
    • First observedsearch_activity_log
    • First observedsearch_calendar_events
    • First observedsearch_conversations
    • First observedsearch_documents
    • First observedsearch_emails
    • First observedsearch_prompt_log
    • First observedsearch_research
    • First observedselect_patient
    • First observedset_agent_state
    • First observedsetup_gdrive
    • First observedstore_lab_values
    • First observedsync_from_gdrive
    • First observedsync_to_gdrive
    • First observedsystem_health
    • First observedupdate_document_category
    • First observedupdate_patient_context
    • First observedupdate_treatment_event
    • First observedupload_document
    • First observedvalidate_categories
    • First observedview_document

TDQS

A3.5/5.0

Scored across 79 tools

Disambiguation3/5

The tool set covers a comprehensive oncology domain, but there is significant overlap between several tools. For example, compare_lab_panels, compare_labs, get_lab_time_series, and get_lab_trends all deal with lab comparison/trend analysis with subtle distinctions that could confuse an agent. Similarly, multiple search tools (search_documents, search_conversations, search_activity_log, etc.) have overlapping search functionality across different data types. The descriptions help clarify boundaries, but the sheer number of similar tools creates ambiguity.

Naming Consistency4/5

Most tools follow a consistent verb_noun or verb_noun_noun pattern (e.g., add_activity_log, get_document, search_conversations). There are minor deviations like gdrive_auth_callback (noun_verb_noun) and system_health (noun_noun), but these are exceptions. The naming is generally predictable and readable across the set, with clear action-object relationships maintained throughout.

Tool Count2/5

With 79 tools, this is an extremely large set that feels overwhelming for the oncology domain. While the domain is complex, many tools could be consolidated (e.g., multiple lab analysis tools, multiple search variants). The count suggests feature creep rather than a well-scoped surface, making it difficult for agents to navigate and increasing the risk of tool misselection.

Completeness5/5

The tool surface provides remarkably complete coverage for oncology patient management. It includes document CRUD (upload, get, delete, restore), lab analysis, treatment event tracking, research integration, Google services synchronization, patient context management, and comprehensive search capabilities across all data types. There are no obvious gaps—every major workflow from data ingestion to analysis to export appears to be supported.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers