Skip to main content
Glama
swsd-mcp

swsd-mcp

by mikimatsub

swsd_sla_risk

Read-onlyIdempotent

Rank open incidents by SLA breach risk using due dates and violations to flag breached, critical, warning, or OK work so teams prioritize at-risk tickets.

Instructions

List open incidents ranked by SLA breach risk. Computes a risk level for each incident based on due_at and sla_violations: "breached" (overdue or has violations), "critical" (due within 4 hours), "warning" (due within at_risk_within_hours), "ok", or "no_due_date". Results are sorted with breached first (most overdue first), then by time-to-breach ascending, no_due_date last. Defaults to excluding Resolved and Closed states. Limitation: incident list rows only normally include due_at. The sla_violations[] array is only present on the long incident layout, so rows are ranked primarily by due_at and violations are counted only when SWSD happens to include them on the row. Use swsd_get_incident with detail_level long for a complete per-incident SLA picture.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (1-indexed).
statesNoFilter to incidents matching ANY of these states.
per_pageNoResults per page (1-100). SWSD caps at 100.
prioritiesNoFilter to incidents matching ANY of these priorities.
max_resultsNoCap returned incidents while scanning up to 10 pages from page (also bounded by page 10000). Stops when enough matches are found; ranks the scanned matches only. scan.truncated reports omitted matches or remaining pages. Without this option, scans one page.
state_is_notNoNegative state filter. Defaults to excluding Resolved and Closed.
updated_fromNoFilter to incidents updated on or after this ISO date or datetime.
assignee_emailNoClient-side case-insensitive filter on assignee email (SWSD ignores it server-side).
updated_withinNoConvenience alias for updated_from: "Nh" is an exact hours-ago ISO timestamp; "Nd" and "Nw" use the UTC calendar date N days or N weeks ago. N must be 1-365. Ignored if updated_from is explicitly set.
assigned_to_groupNoFilter to incidents assigned to this group ID (server-side).
include_no_due_dateNoInclude incidents with no due_at in results. Default false.
at_risk_within_hoursNoHours threshold for "warning" risk bucket. Default 24, max 720 (30 days).

Output Schema

NameRequiredDescriptionDefault
nowYesISO timestamp used as the reference clock for risk computation.
scanYes
countsYesCount of incidents per risk level.
incidentsYes
paginationYes
applied_filtersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses the exact sort order (breached first, most overdue first, no_due_date last), the bucket thresholds, and a real data limitation that sla_violations only appears on the long layout so ranking is primarily due_at-driven. That caveat prevents an agent from over-trusting the violation counts, which is exactly the kind of behavioral context annotations cannot convey.

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 action and then the risk taxonomy, followed by sort order, defaults, and the limitation. Dense but each sentence carries operative information; the bucket enumeration is slightly list-like but is the core value of the tool.

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 12-parameter ranking tool with an output schema, the description covers what an agent needs: what is ranked, how levels are computed, ordering, default filtering, and the known data gap. Return shape is left to the output schema, which is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds meaning on top: it ties at_risk_within_hours to the 'warning' bucket definition and explains the default resolution-state exclusion and include_no_due_date's effect on the no_due_date bucket. It does not elaborate on pagination/max_results scanning behavior beyond what the schema text already states.

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 resource — 'List open incidents ranked by SLA breach risk' — and immediately enumerates the five risk buckets it assigns (breached, critical, warning, ok, no_due_date). This distinguishes it from generic listing siblings like swsd_list_incidents and swsd_my_queue without the agent needing to open 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 clear usage context (triage of open incidents by breach risk), states default filtering behavior (Resolved/Closed excluded), and names an alternative — 'Use swsd_get_incident with detail_level long for a complete per-incident SLA picture' — with the condition that selects it. It stops short of explicitly contrasting against swsd_list_incidents or swsd_my_queue, so it is not a full when/when-not matrix.

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