Skip to content

feat(incidents): expose nums (short id) filter on query_incidents#63

Merged
ysyneu merged 1 commit into
mainfrom
feat/incident-nums-mcp
Jun 1, 2026
Merged

feat(incidents): expose nums (short id) filter on query_incidents#63
ysyneu merged 1 commit into
mainfrom
feat/incident-nums-mcp

Conversation

@ysyneu
Copy link
Copy Markdown
Collaborator

@ysyneu ysyneu commented Jun 1, 2026

Why

query_incidents could only resolve a short incident id (the 6-char num shown in the UI, e.g. 311510) implicitly via the free-text query field. There was no first-class way to filter by short id, mirroring the gap just fixed in the fduty CLI (flashduty-cli#26).

What

Add an explicit nums parameter (comma-separated) that maps to ListIncidentsRequest.Nums, mirroring fduty incident list --nums.

Like the other list filters it is matched within the since/until window; the backend caps the list span at ~30 days, so incidents older than that must be looked up by their full incident_id — documented in the param help. (Direct full-id lookups still use the incident_ids/incident/list-by-ids path, which is time-window-free.)

Verification

  • go build ./..., go vet, full go test ./... — green; gofmt clean.
  • New unit test TestQueryIncidentsNumsReachesWire asserts nums is split and sent as the nums array to /incident/list within the time window (httptest stub).
  • No tool snapshot affected (query_incidents is not in __toolsnaps__).

query_incidents could only resolve a short incident id (the 6-char "num"
shown in the UI) implicitly via the free-text `query` field. Add an
explicit `nums` parameter that maps to ListIncidentsRequest.Nums, mirroring
the `fduty incident list --nums` CLI flag.

Like the other list filters it is matched within the since/until window;
the backend caps the list span at ~30 days, so incidents older than that
must be looked up by their full incident_id (documented in the param help).
@ysyneu ysyneu merged commit e6e0189 into main Jun 1, 2026
13 checks passed
@ysyneu ysyneu deleted the feat/incident-nums-mcp branch June 1, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant