Skip to main content
Glama
WhaTap MCP Server

WhaTap MCP Server

Official
by whatap

whatap_apm_anomaly

Detects APM anomalies by running parallel MXQL queries for TPS, response time, errors, and active transactions, then flags latency spikes, error surges, TPS drops, and transaction pileups.

Instructions

Multi-query APM anomaly detection. Executes 4 MXQL queries in parallel (TPS, response time, errors, active transactions per agent), then applies statistical analysis to detect latency spikes, error surges, TPS drops, and transaction pileups.

PREREQUISITES: projectCode from whatap_list_projects (must be an APM project).

Example: whatap_apm_anomaly(projectCode=12345, timeRange="5m", sensitivity="medium")

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": {
      "projectCode": "<projectCode>"
    },
    "name": "whatap_apm_anomaly"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeRangeNoTime range (default: "5m"). Examples: "5m", "1h", "6h", "1d", "last 30 minutes".5m
projectCodeYesProject code (pcode). Get this by calling whatap_list_projects first — it returns all accessible projects with their pcodes.
sensitivityNoAnomaly detection sensitivity: "low" = only major issues (3σ threshold), "medium" = balanced (2σ, default), "high" = catch subtle issues (1.5σ).medium

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.3

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full disclosure burden. It does well on process — four parallel MXQL queries and the statistical thresholds tied to sensitivity — but never says the tool is read-only/non-mutating, how long it takes or how heavy it is relative to a single query, or what the anomaly result contains. The operational model is exposed; the safety and output profile are not.

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?

Front-loaded with the core purpose, then a clearly labelled prerequisite and a compact example — no padding. The example restates values already given by the schema defaults, which is mild redundancy but not damaging.

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 an analysis tool with no annotations and no output schema, the definition should say what an agent receives back (anomaly list, severity, per-agent breakdown) and whether the call is expensive. It covers inputs and process adequately but leaves the result contract undefined, which is the largest remaining gap for a tool an agent must interpret after calling.

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 100% and each parameter already documents its type, default, and meaning, so the baseline of 3 applies. The description adds only the 'must be an APM project' constraint and a redundant example call using the same defaults the schema already lists; it adds no new semantics for timeRange or sensitivity.

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 a specific verb (detect) and resource (APM anomalies) and explains the mechanism: four MXQL queries in parallel (TPS, response time, errors, active transactions) followed by statistical analysis for latency spikes, error surges, TPS drops, and pileups. That is far more informative than the name alone and functionally separates it from a raw-query sibling, though no sibling is named to draw a hard boundary.

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?

A dedicated PREREQUISITES line states where projectCode comes from (whatap_list_projects) and constrains it to an APM project. That is clear when-to-use context, but there is no guidance on when to prefer this over a plain data query, no note on cost or when the extra work of four queries is warranted, and no exclusions.

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