Skip to main content
Glama
io.github.ryanmat/logicmonitor

io.github.ryanmat/logicmonitor

by ryanmat

diagnose

Read-onlyIdempotent

Collects alert details, device context, correlated alerts, recent changes, blast radius, and diagnostic source results for an alert or device's latest critical alert; does not run diagnostics.

Instructions

Composite diagnosis: given an alert, or a device's latest open critical alert, gathers the alert details, device context, alerts clustered and audit changes in the last four hours, blast radius, and the device's assigned DiagnosticSources with the latest results of the alert's diagnostic runs. correlated_alerts lists the five largest clusters of each type with ten alert ids each, and changes the ten change and spike pairs of highest confidence; cluster_count, by_type and total_correlated count them all. It reads those results and never runs a DiagnosticSource. It computes no health score or root cause; health_check reports each metric's z-score.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diagnose"
  }
}

Input Schema

NameRequiredDescriptionDefault
alert_idNoAlert ID to diagnose
device_nameNoDevice name to diagnose (finds most recent critical alert)
detail_levelNoOutput detail level (default: summary)summary

Output Schema

NameRequiredDescriptionDefault
alertNoget_alert_details; null when the device has no open critical alert.
deviceNoget_device for the alert's device.
portalNoThe portal the call ran against, in multi-portal mode.
changesNoanalyze_alerts 'changes' over the last four hours.
warningsNo
diagnosticsNoRead only: diagnose never runs a DiagnosticSource.
blast_radiusNoFull: analyze_blast_radius.
detail_levelYes
correlated_alertsNoanalyze_alerts 'clusters' over the last four hours.
device_propertiesNoFull: get_device_properties.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv5.0.1
    • removedInput schema / properties / summarize
      Removed value: -{
      -  "default": false,
      -  "description": "Append plain-English NL summary via IBM Granite (requires WATSONX_API_KEY)",
      -  "type": "boolean"
      -}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "alert": {
      +      "description": "get_alert_details; null when the device has no open critical alert.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "blast_radius": {
      +      "description": "Full: analyze_blast_radius.",
      +      "type": "object"
      +    },
      +    "changes": {
      +      "description": "analyze_alerts 'changes' over the last four hours.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "correlated_alerts": {
      +      "description": "analyze_alerts 'clusters' over the last four hours.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "detail_level": {
      +      "enum": [
      +        "summary",
      +        "full"
      +      ],
      +      "type": "string"
      +    },
      +    "device": {
      +      "description": "get_device for the alert's device.",
      +      "type": "object"
      +    },
      +    "device_properties": {
      +      "description": "Full: get_device_properties.",
      +      "type": "object"
      +    },
      +    "diagnostics": {
      +      "additionalProperties": false,
      +      "description": "Read only: diagnose never runs a DiagnosticSource.",
      +      "properties": {
      +        "assigned": {
      +          "description": "DiagnosticSources assigned to the device.",
      +          "items": {
      +            "type": "object"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "latest_results": {
      +          "description": "The alert's latest diagnostic runs, with their output.",
      +          "items": {
      +            "type": "object"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "assigned",
      +        "latest_results"
      +      ],
      +      "type": "object"
      +    },
      +    "portal": {
      +      "description": "The portal the call ran against, in multi-portal mode.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "detail_level"
      +  ],
      +  "type": "object"
      +}
  2. First observedv4.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: it discloses the four-hour lookback window, the truncation limits (five largest clusters per type, ten alert ids each, ten highest-confidence change/spike pairs), and that cluster_count/by_type/total_correlated are full counts rather than truncated ones. It also states two negative behaviors — it never runs a DiagnosticSource and computes no health score or root cause — which prevents the most likely misuse of a 'diagnose' tool.

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 purpose and the input modes, then the output shape, then the exclusions — a sensible order with no filler. The middle sentence is long and packs several counts together, which is dense but each clause carries distinct information.

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 read-only composite aggregator with an output schema, this covers everything an agent needs: what gets gathered, how results are truncated, what is deliberately not computed, and where to go for health scores. Nothing material is missing for correct invocation or interpretation.

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 100%, so the schema already documents all three parameters, including that device_name resolves to the most recent critical alert. The description's 'given an alert, or a device's latest open critical alert' framing adds the either/or relationship between the two inputs, but says nothing about detail_level beyond what the enum already conveys.

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?

States a specific verb and scope ('Composite diagnosis') and enumerates exactly what it assembles: alert details, device context, clustered alerts, audit changes over four hours, blast radius, and DiagnosticSource results. It explicitly contrasts itself with health_check, so an agent can distinguish it from a sibling without opening either schema.

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?

Gives concrete entry conditions — either an alert id or a device name that resolves to its latest open critical alert — and routes health-score/root-cause questions to health_check. It does not name the tool that actually runs a DiagnosticSource, even though it points out this one never does, so the alternative for that path is left implicit.

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

Deploy Server

Other Tools