Skip to main content
Glama
PAP Analytics MCP

PAP Analytics MCP

by drew2323

find_anomalies

Detect and rank nightly PAP anomalies with plain-English reasons and suggested calls to investigate event clusters, leaks, desaturations, pressure, ventilation gaps, and 14-night outliers.

Instructions

Parts of a night worth a look (event clusters, large leak, desaturations, pressure at max, low ventilation, mask-off gaps, metric outliers vs the last 14 nights), most severe first, each with a plain-English reason and a suggested_call to inspect it.

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": "find_anomalies"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYes
device_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does meaningful work: it discloses result ordering (most severe first), per-item payload (plain-English reason plus suggested_call), and the comparison window (last 14 nights). It leaves open whether the call is read-only, how a missing or sparse night is handled, and whether a device must be resolved first, so it is informative but not exhaustive.

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?

A single sentence with a front-loaded parenthetical catalog of anomaly types, then ordering and payload details — dense but well ordered. The nested parenthetical is slightly hard to parse, but no sentence is wasted.

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?

Return details are partly covered by the existing output schema and the description appropriately summarizes severity ordering and the suggested_call field rather than re-specifying the shape. However, for a tool with zero annotation coverage and 0% schema parameter descriptions, omitting any explanation of `date` and `device_id` leaves a real gap in an otherwise well-characterized definition.

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% for two parameters, so the description must compensate and does not. It never explains what `date` means (the night to analyze, and in what format or timezone) or what `device_id` does when null — the schema only marks it nullable with a null default. The agent must guess at required input semantics.

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 names the resource precisely and enumerates what counts as an anomaly: event clusters, large leak, desaturations, pressure at max, low ventilation, mask-off gaps, and metric outliers. That enumeration lets an agent tell it apart from neighbors like night_summary or disturbance_summary without opening a schema. It stops short of an explicit verb ('find/scan a night') and never names a sibling, so it is clear but not maximally differentiated.

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

Usage Guidelines3/5

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

Usage is only implied: the phrase 'parts of a night worth a look' and the presence of a suggested_call suggest a triage-first workflow, and 'vs the last 14 nights' hints at the comparison baseline. There is no explicit when-to-use statement, no when-not-to-use, and no named alternative among compare_periods, disturbance_summary, or night_summary.

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