Skip to main content
Glama
PAP Analytics MCP

PAP Analytics MCP

by drew2323

compare_periods

Mean nightly metrics for period A and B with absolute and relative delta (B − A). include_disturbances=true adds the nightly disturbance_trend metrics (pulse, flow limitation, breathing stability, flow shape NED/Glasgow, RERA…

Instructions

Mean nightly metrics for period A and B with absolute and relative delta (B − A). include_disturbances=true adds the nightly disturbance_trend metrics (pulse, flow limitation, breathing stability, flow shape NED/Glasgow, RERA candidates), e.g. to compare nights before and after a pressure change; slower (about 1-3 s per night).

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": {
      "a_from": "<a_from>",
      "a_to": "<a_to>",
      "b_from": "<b_from>",
      "b_to": "<b_to>"
    },
    "name": "compare_periods"
  }
}

Input Schema

NameRequiredDescriptionDefault
a_toYes
b_toYes
a_fromYes
b_fromYes
device_idNo
include_disturbancesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.11
    • addedInput schema / properties / include_disturbances
      Added value: +{
      +  "default": false,
      +  "title": "Include Disturbances",
      +  "type": "boolean"
      +}
  2. First observedv0.1.6

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the disclosure burden and does reasonably well: it declares the operation is a read/compute, fixes the delta sign convention (B − A), explains what the optional flag adds, and warns about runtime cost (roughly 1-3 s per night). It omits failure behavior for invalid or overlapping periods and any permission requirements.

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 compact sentences, front-loaded with the core computation, followed by the optional-flag effect and the cost caveat. Every clause carries information an agent needs; nothing is padded.

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?

An output schema exists, so return values need not be explained, and the description covers the computation, the optional extension, and the performance trade-off. The remaining gaps are the date format and the role of device_id for a six-parameter tool.

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 description coverage is 0%, so the description must compensate. It clarifies include_disturbances (the only non-obvious semantic parameter) and implies the a_*/b_* pairs bound the two comparison periods, but says nothing about device_id behavior, date string format, or validation of the ranges.

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 states a specific computation: mean nightly metrics over two named periods plus absolute and relative deltas, with delta direction fixed as B − A. That is concrete enough to distinguish it from single-night siblings like night_summary, though no sibling is named explicitly.

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?

It gives a clear motivating scenario (comparing nights before and after a pressure change) and notes when to set include_disturbances. There is no guidance on when not to use it or which sibling to prefer for single-period aggregation.

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