Skip to main content
Glama
Barbaroso

OSCAR MCP Server

by Barbaroso

OSCAR MCP Server

A read-only Model Context Protocol server that lets an LLM assistant — Claude Desktop, ChatGPT Codex, GitHub Copilot CLI, VS Code, or anything else that speaks MCP — analyse your own CPAP/BiPAP therapy data from OSCAR.

It talks directly to the SQLite database that OSCAR 2.x writes (oscar.db), so no export step is needed and OSCAR can stay open while you use it.

Claude / Copilot  ──stdio──►  oscar-mcp  ──read-only──►  oscar.db

Your data never leaves your machine. The server opens the database read-only, withholds personal identifiers by default, and cannot write to it even if asked.

Not medical advice. This is an informational tool for reviewing your own data. It is not a medical device, and it is not affiliated with or endorsed by the OSCAR project.

What you can ask

Once connected, questions like these work:

  • "Summarise my last 30 nights of CPAP therapy."

  • "Is my AHI trending up or down?"

  • "Which nights had the worst leaks, and did the mask setting change on those nights?"

  • "Show me when apneas clustered during the night of 12 March."

  • "Did changing my minimum pressure make a difference?"

Related MCP server: HealthLedger MCP

Requirements

  • Python 3.10+

  • OSCAR 2.x, which stores data in oscar.db (OSCAR 1.x uses a different on-disk format and is not supported)

Install

git clone https://github.com/Barbaroso/oscar-mcp.git
cd oscar-mcp
pip install -e .

Check that it can find your data:

python -c "from oscar_mcp import discover; print(discover().as_dict())"

Expected output:

{'data_dir': 'C:\\Users\\you\\Documents\\OSCAR20_Data',
 'db_path':  'C:\\Users\\you\\Documents\\OSCAR20_Data\\oscar.db',
 'discovered_via': 'registry:HKCU\\Software\\OSCAR_Team\\OSCAR 2.0\\Settings'}

The data folder is resolved in this order: OSCAR_DATA_DIR → the path OSCAR recorded in the Windows registry → common documents folders (including OneDrive-redirected ones). If none of those work, set OSCAR_DATA_DIR explicitly.

Auto-detection runs only when you have not said where the data is. If OSCAR_DATA_DIR is set but holds no oscar.db, the server refuses to start rather than searching on — a typo should not quietly open a backup, a second profile, or another household member's therapy data.

Connect it

Claude Desktop

Edit claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "oscar": {
      "command": "python",
      "args": ["-m", "oscar_mcp"],
      "env": {
        "OSCAR_DATA_DIR": "C:\\Users\\you\\Documents\\OSCAR20_Data"
      }
    }
  }
}

Restart Claude Desktop. The OSCAR tools appear in the tools menu.

ChatGPT Codex

Edit ~/.codex/config.toml:

[mcp_servers.oscar]
command = "python"
args = ["-m", "oscar_mcp"]
default_tools_approval_mode = "writes"

[mcp_servers.oscar.env]
OSCAR_DATA_DIR = "C:\\Users\\you\\Documents\\OSCAR20_Data"

Restart Codex. See Approvals for what the approval mode does.

GitHub Copilot CLI / VS Code

Add to mcp.json:

{
  "servers": {
    "oscar": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "oscar_mcp"],
      "env": {
        "OSCAR_DATA_DIR": "C:\\Users\\you\\Documents\\OSCAR20_Data"
      }
    }
  }
}

Not installed with pip?

Point at the source directory instead:

{
  "command": "python",
  "args": ["-m", "oscar_mcp"],
  "cwd": "C:\\path\\to\\oscar-mcp"
}

On Windows, use the full interpreter path (for example C:\\Python314\\python.exe) if python is not on the PATH seen by the client application.

Approvals

Every tool here is declared read-only in its MCP metadata (readOnlyHint), and the declaration is true: the database is opened with SQLite's mode=ro and run_sql accepts nothing but a single SELECT. Nothing this server exposes can change your therapy data.

Clients use that declaration to decide when to interrupt you. Codex reads it through default_tools_approval_mode, which takes four values:

Value

Meaning

prompt

Ask before every call.

auto

Decide from what each tool declares about itself.

writes

Ask only for tools that are not declared read-only.

approve

Pre-approve everything this server exposes.

writes is recommended. Every tool here declares itself read-only, so nothing prompts today; but if a future tool ever stops making that promise, it still stops to ask. approve gives up that protection, so prefer it only for a server you have read.

If a sandboxed, non-interactive run reports user cancelled MCP tool call, that is an approval nobody was present to answer -- not a crash, and not a failure of the server.

Tools

Tool

Purpose

list_profiles

Profiles, devices and the date range that has data. Start here.

get_device_info

Therapy devices, model and last import time.

get_daily_summaries

Night-by-night table: usage, AHI, events, pressure, leak.

get_statistics

Aggregates for a period: compliance, AHI distribution, trends.

get_daily_detail

One night in full: sessions, settings, per-channel statistics.

get_respiratory_events

Individual apneas/hypopneas/RERAs and when they clustered.

get_therapy_settings

Machine settings over time, and what changed on which night.

get_session_details

Per-channel statistics for a single session.

list_channels

Maps numeric channel ids to names such as AHI or Leak Rate.

describe_database

Tables, columns, foreign keys and the rules for writing a correct query.

run_sql

A single read-only SELECT for anything the other tools miss.

run_sql guardrails

This schema reuses column names across tables, so the natural guess — join the columns whose names match — returns zero rows or a plausible but wrong answer rather than an error. The traps are real: sessions.session_id is not the primary key, channels.id is not the channel identifier, and session_settings.value is a device-specific code where 1 means Nasal on MaskType but Full Face on RMS9_Mask.

run_sql therefore does four things beyond running the query:

  • Warns on query shapes known to return silently wrong results — wrong join key, a date taken from start_time without the noon shift, or reading respiratory_events.event_type as though it were the event kind.

  • Decodes setting codes automatically, adding a value_label column resolved through channel_options, so a raw number is never left to be guessed.

  • Points to get_therapy_settings for categorical settings, which applies the mapping itself.

  • Cancels a query that overruns its time budget (10 s by default), rather than hanging. The row limit cannot prevent this on its own: producing the first row of an unintended cross join already requires scanning every combination, so a missing join condition runs forever no matter how few rows you asked for. The cancellation message says so, because that is nearly always the cause.

describe_database returns the foreign keys and the same rules, because guidance that lives only in a passive resource is not read by the caller who needs it.

Responses carry their units and reference bands (AHI < 5 normal, 5–15 mild, 15–30 moderate, ≥ 30 severe; 4 h/night compliance; 24 L/min large-leak threshold) so the assistant reads the numbers in context rather than guessing.

Resources: what the numbers mean

Tools return values. Resources return the domain model needed to read those values correctly, so the assistant is not left inferring clinical meaning from column names. They are static, cheap to read, and cost no tool call.

Resource

Contents

oscar://model/metrics

Exact AHI and RDI formulas, which events count toward each, and the source in OSCAR's code.

oscar://model/interpretation

The caveats that turn a correct number into a wrong conclusion.

oscar://model/entities

Tables as real-world concepts, with the join keys and the traps in them.

oscar://model/glossary

Apnea, hypopnea, clear airway, RERA, CSR, leak — as OSCAR itself defines them.

oscar://model

All of the above in one document.

Every clinical or arithmetic claim cites a primary source in the OSCAR project — its own help/help_en/glossary.html or its C++ implementation in SleepLib/ — rather than restating received wisdom. The AHI and RDI formulas are taken from SleepLib/day.h and reproduce OSCAR's own stored values exactly. A test enforces that no claim ships without a citation.

This matters because the raw numbers invite specific wrong readings, for example:

  • Large leak invalidates a night. Leak severe enough to compromise therapy also degrades event detection, so that night's AHI is not comparable with a well-sealed night's.

  • RDI already contains AHI. They are two views of one night, separated by RERAs, and must never be summed.

  • Clear-airway events are not treated by more pressure, unlike obstructive ones.

  • Cross-brand AHI is not comparable: ResMed flags hypopnea at ~50% flow reduction, Respironics at ~40%.

  • A device AHI is not a sleep study. The machine cannot tell sleep from wakefulness.

Prompts: how to run a review

Reusable workflows that encode the order of questions producing a sound reading, so the analysis does not depend on knowing which tool to ask for first.

Prompt

Purpose

review_therapy

Review recent nights, checking leak before drawing conclusions from AHI.

investigate_leak

Find which nights leaked, how badly, and what changed around them.

compare_periods

Test whether something really changed between two date ranges.

prepare_for_appointment

A factual summary to bring to a clinician, with questions to ask.

Nights, not calendar days

A session that starts after midnight belongs to the previous night, matching how OSCAR itself reports data. A session starting at 02:00 on 12 March is part of the night of 11 March. The cut-off is noon.

Where the numbers come from

OSCAR computes daily_summaries lazily, so the most recent night is often missing from it. Those nights are recomputed from the underlying sessions. Every night carries a source field: oscar for values OSCAR itself calculated, computed for values derived here.

Privacy

Your therapy data is medical data. This server is built to keep the exposure minimal:

  • Read-only. The database is opened with SQLite's mode=ro URI, so writes fail at the driver level. run_sql additionally accepts only a single SELECT/WITH statement and rejects PRAGMA, ATTACH and every write keyword.

  • No identifiers by default. first_name, last_name, dob, address, phone, email, password_hash and device serial_number are stripped from every response, and the user_info / doctor_info tables are not reachable at all — including through renamed expressions in run_sql.

  • Local only. The server runs on your machine and speaks stdio to the client next to it. It opens no network connections of its own.

  • OSCAR is untouched. The database uses WAL journalling, so reading while OSCAR is running is safe and changes nothing.

Set OSCAR_MCP_INCLUDE_PII=1 to lift the identifier filtering. Only do that if you understand that the data then leaves your machine as part of the conversation with whatever model your client is using.

Configuration

Variable

Effect

OSCAR_DATA_DIR

Path to the folder containing oscar.db. Overrides auto-detection.

OSCAR_MCP_SQL_TIMEOUT

Seconds a run_sql query may run before it is cancelled. Default 10.

OSCAR_MCP_INCLUDE_PII

1 to include personal identifiers. Off by default.

Development

pip install -e ".[dev]"
python -m pytest
python -m ruff check .

Tests run against a synthetic database built by tests/fixture.py. No real therapy data is used or committed. The fixture derives AHI and RDI from its own event counts using OSCAR's formulas, so the semantic layer's documented arithmetic is verified rather than asserted, and it reproduces the schema's join and enum hazards so the guardrails can be tested against them.

Contributions are welcome. Two rules matter more than style here:

  1. No unsourced clinical claims. Anything the server asserts about therapy must cite a primary source in the OSCAR project, and a test enforces this.

  2. Read-only, always. The database is someone's medical record. No code path may open it writable or widen what run_sql accepts.

Credits

Built for OSCAR (Open Source CPAP Analysis Reporter), whose developers did the hard work of decoding CPAP device formats. The clinical definitions and the AHI/RDI formulas used here come from OSCAR's own help glossary and source code, cited inline in oscar_mcp/knowledge.py.

This project is an independent companion tool. It is not affiliated with, endorsed by, or supported by the OSCAR project or by any device manufacturer.

License

GPL-3.0-or-later, matching OSCAR, from which the clinical reference material is derived. See LICENSE.

Disclaimer

This is an informational tool for reviewing your own data. It is not a medical device and does not provide medical advice. Discuss any therapy change with your clinician.

Available Tools

11 tools
describe_databaseA

Describe the OSCAR database: tables, columns, foreign keys, and the join and decoding rules that make a query correct. Read this before writing run_sql.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden. It is a describe operation, inherently read-only, and the text clarifies what information is returned (tables, columns, etc.), adding behavioral context. However, it does not mention potential latency, output size, or that it makes no changes, but the nature of the tool makes this less critical.

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?

Two concise sentences, the first states the core purpose with examples, the second gives actionable guidance. No wasted words; front-loaded and well-structured.

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?

Given zero parameters and no output schema, the description fully covers what the tool provides: a comprehensive schema overview plus join/decoding rules. The explicit link to run_sql completes the context, making it self-sufficient for an agent to invoke correctly.

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?

There are no parameters, so baseline 4 applies. The description adds no parameter info, but none is needed. It appropriately focuses on what the tool does rather than parameters.

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?

The description clearly states the tool describes the OSCAR database, listing specific components (tables, columns, foreign keys, join and decoding rules). It names run_sql as the sibling tool meant to be used afterward, effectively distinguishing its purpose as a preparatory schema-inspection tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs the agent to read this before writing run_sql, providing a clear usage context and relationship to the sibling tool. This is a direct 'when to use' guideline, fulfilling the dimension.

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

get_daily_detailB

Everything recorded for one night: each session, machine settings in effect, event counts and per-channel statistics. Date must be ISO format.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
profileNo

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses the scope of returned data and the ISO date requirement, but does not explain the optional profile parameter's effect, pagination, or the output structure. The read-only nature is implied by 'get' but not explicitly stated.

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 is compact and front-loaded, using two short sentences to convey the tool's content and a key constraint. Every phrase adds value without unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and annotations, the description reasonably outlines the categories of returned data. However, it omits profile parameter semantics and any relationship to sibling tools, leaving gaps in what an agent can infer about output format and filtering behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must compensate. It explains the date parameter's ISO format but says nothing about the optional profile parameter, its allowed values, or how it filters results. This leaves a required parameter half-documented.

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?

The description clearly states what the tool does: it retrieves all recorded data for one night, including sessions, machine settings, event counts, and per-channel statistics. This distinguishes it from siblings like get_daily_summaries and get_session_details by emphasizing the comprehensive detail scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit guidance on when to use this tool versus alternatives such as get_daily_summaries or get_session_details. The date format requirement is mentioned, but there is no comparison, exclusion, or context about when the detailed view is appropriate.

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

get_daily_summariesB

Return a night-by-night table of therapy results (usage hours, AHI, event counts, pressure and leak). Dates are ISO format; omit them for all data.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
profileNo
end_dateNo
start_dateNo

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses the return content (therapy results fields) and the date-handling behavior (ISO format, omit for all data). However, it does not explain the effect of limit or profile parameters, or whether results are ordered or paginated. The level of detail is moderate but incomplete.

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 is a single, well-structured sentence packed with essential information. It front-loads the main purpose and adds a concise note on date handling. Every word earns its place, with no unnecessary filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 4 parameters, no output schema, and no annotations, making description completeness crucial. While it covers the output fields and date parameters, it omits the behavior of limit and profile, and lacks any mention of ordering or pagination. For a 4-parameter tool with no output schema, this is insufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the start_date and end_date behavior via the note on ISO format and 'omit them for all data', but it does not explain the limit or profile parameters at all. Half the parameters remain undocumented in both the schema and description, leaving significant ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a night-by-night table of therapy results with specific metrics (usage hours, AHI, event counts, pressure, leak). It is specific and informative, but it does not explicitly distinguish this tool from siblings like get_daily_detail or get_statistics, so it lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide guidance on when to use this tool versus alternatives like get_daily_detail or get_statistics. It only gives a note about date formats and omitting them for all data, which is parameter usage, not tool selection guidance. No exclusions or alternatives are mentioned.

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

get_device_infoB

Get the therapy devices recorded for a profile, including model and last import time.

ParametersJSON Schema
NameRequiredDescriptionDefault
profileNo

TDQS

B3.2/5.0
Behavior2/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 only mentions output fields but does not disclose read-only nature, behavior for null or invalid profiles, empty result handling, or error conditions. This is a significant gap.

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 is a single sentence, concise and front-loaded with the action and object. It contains no fillers or redundancy, making it easy to parse and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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 and no annotations, the description should explain the return structure and edge cases. It only mentions two output fields but does not specify whether a list is returned, how null is handled, or what happens on error, leaving the description incomplete for reliable invocation.

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?

The description clarifies that the 'profile' parameter refers to the profile whose devices are fetched, adding meaning beyond the bare schema name. However, it does not explain the null default or expected format (e.g., ID vs name), so compensation for the 0% schema description coverage is only partial.

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?

The description clearly states the action ('Get'), the resource ('therapy devices recorded for a profile'), and the output scope ('including model and last import time'). This distinguishes it from sibling tools that focus on summaries, settings, or sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. It only states what the tool does, leaving the agent to infer usage context without any explicit direction.

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

get_respiratory_eventsB

Individual respiratory events (apneas, hypopneas, RERAs) for one night, with counts by type and an hourly histogram showing when they clustered. Large leak spans are reported separately from respiratory events.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
profileNo
include_eventsNo

TDQS

B3.3/5.0
Behavior3/5

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

Without annotations, the description carries the burden for behavior. It adds that large leak spans are reported separately, which is useful, but it does not disclose side effects, read-only nature, or the impact of the include_events parameter. The description provides some transparency but leaves key behavior unspecified.

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 is two sentences with no filler. It front-loads the core purpose and adds a brief behavioral note. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 3 parameters, no annotations, and no output schema. The description covers the output shape in part but leaves parameter semantics and usage context unaddressed. For a tool with multiple parameters and no schema documentation, the description is not complete enough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% coverage and the description does not explain any parameters. 'one night' hints at the date parameter, but there is no mention of profile or include_events. The agent cannot infer what include_events toggles or what profile means.

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?

The description clearly states the tool provides individual respiratory events (apneas, hypopneas, RERAs) for one night, along with counts by type and an hourly histogram. This specific scope distinguishes it from siblings like get_daily_summaries or get_daily_detail.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives. The note about large leak spans being reported separately is a behavior nuance, not a usage context. The tool does not mention exclusions or alternatives.

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

get_session_detailsB

Per-channel statistics for a single session, identified by its session_db_id.

ParametersJSON Schema
NameRequiredDescriptionDefault
profileNo
session_db_idYes

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It only states what the tool returns and does not mention read-only nature, permissions, error conditions, or output format, leaving an agent without critical safety and expectation details.

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 is a single, front-loaded sentence with no redundancy. Every word adds meaning and the structure is optimal for quick scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is minimal and leaves the agent uncertain about the exact output and the optional profile parameter. No output schema or annotations exist to fill gaps, so the description should provide more detail about what 'per-channel statistics' includes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains the session_db_id parameter's role, but it completely omits the profile parameter. With 0% schema description coverage, the description should compensate for both parameters, which it fails to do.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns per-channel statistics for a single session, identifying the session_db_id as the key. It is distinct from siblings like get_daily_summaries by scope, though it does not explicitly differentiate from get_statistics.

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?

The description implies usage when a session_db_id is known and channel-level detail is needed. It provides clear context but does not explicitly exclude alternatives or mention when to prefer this over other statistics tools.

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

get_statisticsC

Aggregate statistics for a period: usage and compliance, AHI distribution and severity band, event totals, pressure and leak summaries, plus simple trends.

ParametersJSON Schema
NameRequiredDescriptionDefault
profileNo
end_dateNo
start_dateNo

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description must carry the burden of disclosing behavioral traits. It indicates aggregation but does not explicitly state read-only behavior, output format, default date handling, or any permissions. 'Aggregate statistics' implies a safe read operation, but that is not confirmed.

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 description is a single sentence with a clear leading verb and a compact list of statistics categories. It avoids filler and is front-loaded, though the enumeration is somewhat dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description offers a useful high-level overview but omits parameter semantics, return shape, and boundary behaviors. It is insufficient for a tool with three undocumented parameters and several sibling tools covering different granularities.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage and no per-field descriptions. The description only mentions 'a period', loosely mapping to start_date and end_date, but does not explain the profile parameter, date format, or default behavior. It fails to compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Aggregate statistics') and a resource ('for a period'), and enumerates the content areas included (usage, compliance, AHI distribution, event totals, pressure/leak summaries, trends). It is reasonably clear, though it does not explicitly distinguish itself from the sibling get_daily_summaries tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. The phrase 'for a period' implies use for period-level statistics, but with siblings like get_daily_summaries and get_daily_detail, the description should state when this aggregate tool is preferred over those alternatives.

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

get_therapy_settingsC

Machine settings over time (pressure limits, EPR, mode, ramp, humidity). Set changes_only to report just the nights where a setting changed.

ParametersJSON Schema
NameRequiredDescriptionDefault
profileNo
end_dateNo
start_dateNo
changes_onlyNo

TDQS

C2.9/5.0
Behavior2/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 only states the general purpose and the effect of the changes_only parameter, but does not disclose output format, default behavior, date range handling, or any other operational traits.

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 is exactly two sentences, front-loaded with the tool's core purpose, and contains no redundant words. Every phrase contributes value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given four optional parameters, no annotations, and no output schema, the description is too sparse to set complete expectations about return values, pagination, or default date ranges. The bare-bones nature leaves significant gaps for an agent trying to invoke the tool 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 coverage is 0%, so the description is the only source of parameter meaning. It explains changes_only well, but profile, start_date, and end_date are left to be inferred from their names, which is reasonable but not fully compensating for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves machine settings over time and explicitly lists the setting types (pressure limits, EPR, mode, ramp, humidity). It is specific enough to distinguish from sibling tools, though it does not explicitly contrast itself with alternatives as in the get_calls example.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives like get_daily_summaries or get_device_info. It only offers a parameter hint about changes_only, which is not equivalent to usage guidance.

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

list_channelsA

List the data channels OSCAR recorded, mapping numeric channel ids to human readable names such as AHI, Pressure, Leak Rate or Flow Limitation.

ParametersJSON Schema
NameRequiredDescriptionDefault
profileNo
only_usedNo

TDQS

A3.6/5.0
Behavior3/5

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

The description adds context about mapping IDs to names, but it omits key behavioral details such as the default filtering via only_used=true (default) and the meaning of profile. Without annotations, these gaps are significant, though the tool is likely read-only.

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 is a single, well-structured sentence that front-loads the action ('List') and includes relevant examples without unnecessary padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool, the description covers the main purpose but is incomplete given no annotations or output schema. It doesn't explain return format (beyond mapping), default behavior, or parameter semantics, leaving the agent to infer from parameter names and defaults.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%; the description does not explain the 'profile' or 'only_used' parameters. It only hints at channel names, which concerns output, not parameters. The description fails to compensate for the lack of parameter documentation.

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?

The description clearly states the tool's function: listing OSCAR-recorded data channels and mapping numeric IDs to human-readable names. It includes specific examples (AHI, Pressure) and is distinct from siblings like list_profiles or get_daily_summaries.

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?

The description implies use when needing channel names or interpreting numeric IDs. It doesn't explicitly state alternatives or when not to use it, but the purpose is clear enough to guide selection among sibling tools.

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

list_profilesA

List OSCAR profiles with their data coverage. Call this first when you do not know which profile or date range is available.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior3/5

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

There are no annotations, so the description carries the full burden of behavioral disclosure. The verb 'List' implies a read-only operation, and 'data coverage' gives useful context about the output. However, it does not explicitly state that the tool has no side effects or whether it makes external calls. For a simple list operation, this is adequate but not highly 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 is two short sentences: the first states what the tool does, the second provides usage context. Every word earns its place, and the information is front-loaded with the verb and resource first. No fluff or redundancy.

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?

For a simple list tool with no output schema, the description sufficiently states the return content ('profiles with their data coverage') and provides strong usage context ('call this first'). Given the low complexity and zero params, the description is complete and leaves no major gaps.

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 tool has zero parameters, and the schema is empty. With 0 params, the baseline is 4, and the description adds no parameter-specific details because none are needed. The mention of 'data coverage' is not parameter-related but enriches the overall understanding.

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?

The description uses the specific verb 'List' with a clear resource ('OSCAR profiles') and adds the scope 'with their data coverage'. This distinguishes it from sibling tools like list_channels and describe_database, which target different resources. The purpose is immediately understandable.

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?

The description provides explicit guidance: 'Call this first when you do not know which profile or date range is available.' This makes the primary use case clear. It does not mention alternatives or when not to use, but the 'call this first' placement strongly implies it is the entry point for discovery.

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

run_sqlA

Run a read-only SELECT against the OSCAR database for analysis the other tools do not cover. Only SELECT/WITH statements are permitted, and a query is cancelled if it exceeds its time budget. Call describe_database first: this schema reuses column names across tables, so a wrong join key returns zero rows instead of an error. For mask, mode and other categorical settings prefer get_therapy_settings, because raw values are device-specific codes whose meaning depends on the channel.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden. It explicitly states read-only nature, permitted statement types (SELECT/WITH), time-budget cancellation, and the schema pitfall where wrong join keys return zero rows. These are valuable behavioral insights beyond what the schema or annotations would show.

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 is three sentences, each serving a distinct purpose: stating the overall purpose, listing constraints, and giving usage guidance with alternatives. There is no redundancy or filler; every sentence earns its place.

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?

The description covers critical safety and operational context (read-only, timeout, schema ambiguity) and directs users to specialized tools where appropriate. However, it does not mention the return format or any authorization requirements, which would be useful for a generic SQL tool with no output schema.

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?

The description adds meaning for the 'sql' parameter by restricting permitted statements and warning about join keys, but it does not explain the 'limit' parameter or provide examples of valid SQL formatting. Since schema description coverage is 0%, the description only partially compensates for the undocumented parameters.

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?

The description states 'Run a read-only SELECT against the OSCAR database for analysis the other tools do not cover,' which clearly identifies the action, resource, and scope. It also distinguishes this tool from specialized siblings by presenting it as the generic fallback for uncovered analyses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided: 'Call describe_database first' is a clear prerequisite, and 'For mask, mode and other categorical settings prefer get_therapy_settings' names a specific alternative. The phrase 'analysis the other tools do not cover' defines when to choose this tool over others.

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

Tool Schema Changelog

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

  1. 11 tool updatesv0.1.0
    • First observeddescribe_database
    • First observedget_daily_detail
    • First observedget_daily_summaries
    • First observedget_device_info
    • First observedget_respiratory_events
    • First observedget_session_details
    • First observedget_statistics
    • First observedget_therapy_settings
    • First observedlist_channels
    • First observedlist_profiles
    • First observedrun_sql

TDQS

A3.7/5.0

Scored across 11 tools

Disambiguation5/5

Each tool targets a distinct resource or action: metadata (describe_database, list_profiles, list_channels), device info, summaries, statistics, nightly details, events, settings, and session details. Even run_sql is clearly scoped as a fallback for analyses not covered by the specialized tools, and descriptions clarify boundaries between similar tools like get_daily_detail vs get_session_details.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (run_sql, list_profiles, get_device_info, list_channels, describe_database, get_daily_summaries, etc.). The verbs are predictable (list/get/describe/run) and nouns are clear, making the API easy to navigate.

Tool Count5/5

With 11 tools, the server is well-scoped for the domain of OSCAR CPAP data analysis. Each tool covers a necessary part of the workflow (profiles, schema, raw queries, summaries, statistics, details, events, settings, sessions) without redundancy or bloat.

Completeness5/5

The tool surface provides comprehensive coverage for reading and analyzing therapy data: profile discovery, device info, channel mapping, database schema, nightly summaries, period statistics, per-night detail, event-level data, settings history, and session-level stats. The inclusion of run_sql fills any potential ad-hoc analysis gaps, leaving no obvious dead ends.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A zero-config MCP server that enables AI to access, analyze, and manage local SQLite databases with secure read-only querying and automatic schema discovery.
    8
    MIT
  • A
    license
    C
    quality
    B
    maintenance
    A local-first, model-agnostic MCP server that stores personal health data in a SQLite file and provides analysis-ready views for any AI client to log, retrieve, and reason over health records.
    79
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for SQLite databases, enabling AI assistants to safely query and inspect database schemas without write access.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Read-only MCP server that exposes Apple Health data (steps, workouts, sleep, etc.) from a local SQLite store, allowing AI agents to query health metrics without sending data to hosted services.
    7
    Apache 2.0