Skip to main content
Glama
PAP Analytics MCP

PAP Analytics MCP

by drew2323

disturbance_summary

Sleep disturbances beyond AHI for a night or a window: measured (pulse rate response to events, rapid pulse rises with their breathing response, hypoxic burden, flow limitation, calm vs restless breathing, inspiratory flow shape…

Instructions

Sleep disturbances beyond AHI for a night or a window: measured (pulse rate response to events, rapid pulse rises with their breathing response, hypoxic burden, flow limitation, calm vs restless breathing, inspiratory flow shape NED/Glasgow Index) and inferred (possible autonomic arousals, RERA candidates from device flow limitation and from NED) metrics, flow_shape_by_ps (flow shape split by pressure support 0 / > 0), plus timestamped findings (incl. restless breathing periods) and per-event pulse responses. Inferred items are not scored arousals/RERAs; calm/restless is not sleep staging.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "date": "<date>"
    },
    "name": "disturbance_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
dateYes
startNo
device_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

C2.9/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, and it delivers a genuinely useful interpretive caveat: 'Inferred items are not scored arousals/RERAs; calm/restless is not sleep staging,' which prevents misuse of the output. It does not state that this is a read-only computation, what permissions or device scope apply, or how findings are ordered or bounded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence that leads with the scope before the metric inventory, which is good structure. However, it is dense with backtick-quoted field enumerations that read like output-schema keys, and it packs caveats into the same run-on sentence rather than separating them.

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?

An output schema exists, so the tool need not explain return shapes, and the description adds important interpretation caveats about inferred metrics. The gaps are on the input side: four undocumented parameters, no annotations, and no statement of the read-only nature of a clinical summary call.

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% across four parameters, and the description explains none of them: no format for `date`, no statement that `start`/`end` define a multi-night window versus a single night, and `device_id` is never mentioned at all. The 'night or a window' phrasing is the only faint link to start/end and is not enough to compensate for a total coverage 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 opens with a specific scope: 'Sleep disturbances beyond AHI for a night or a window,' then enumerates the exact metric families returned (`measured`, `inferred`, `flow_shape_by_ps`, `findings`). That distinguishes it reasonably from generic summary siblings like night_summary by the 'beyond AHI' framing, though it never names a sibling explicitly.

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?

There is no explicit when-to-use or when-not-to-use guidance, no prerequisites, and no named alternative such as disturbance_trend or night_summary. The phrase 'for a night or a window' hints at two calling modes but the agent must infer that selection logic entirely from the schema.

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