Skip to content

Add serviceOnCall tool for incident routing, bump SDK to v2026.5.12#118

Open
saditya370 wants to merge 1 commit into
mainfrom
feat/service-on-call-mcp
Open

Add serviceOnCall tool for incident routing, bump SDK to v2026.5.12#118
saditya370 wants to merge 1 commit into
mainfrom
feat/service-on-call-mcp

Conversation

@saditya370
Copy link
Copy Markdown
Contributor

Summary

Adds a new MCP tool serviceOnCall that returns the person(s) currently on-call for a given service. Customers building incident-response agents (notably OLX) need this to route pages and operational questions to the right responder — MCP previously exposed team ownership but not the active on-call individual.

Part 2 of OpsLevel GitLab issue 14711 (gap 1 — users tool tags/teams — landed in #113).

Changes

src/cmd/root.go

  • New types serializedOnCallUser and serializedOnCall — keeps the JSON output tight: {Id, Name, Email, User?}. User is populated when the on-call maps to an OpsLevel user; absent for external-only on-call records (e.g. PagerDuty users not in OpsLevel).
  • New tool serviceOnCall taking a required identifier (service id or alias). Handler resolves the service, calls service.GetOnCalls(...), maps to the serialized form.
  • Tool description is concise: "Returns the person currently on-call for a given service. Use this for incident-response routing."

src/go.mod / src/go.sum

  • Bumped github.com/opslevel/opslevel-go/v2026 from v2026.5.6v2026.5.12 (release that includes the new OnCall types and Service.GetOnCalls() method).

Linked PRs

  • SDK: [link to opslevel-go PR]
  • Backend (GraphQL schema): [link to monolith PR — already merged + deployed]

Test plan

  • go build ./... passes
  • go vet ./... clean
  • go tool golangci-lint run ./... clean
  • Smoke test: hit the serviceOnCall tool against a real account with an on-call schedule, verify both user-mapped and external-only responders surface correctly

@saditya370 saditya370 requested a review from andrewstillv15 May 12, 2026 14:58
@saditya370 saditya370 self-assigned this May 12, 2026
@andrewstillv15
Copy link
Copy Markdown
Contributor

working per MCP inspector

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.

2 participants