Add serviceOnCall tool for incident routing, bump SDK to v2026.5.12#118
Open
saditya370 wants to merge 1 commit into
Open
Add serviceOnCall tool for incident routing, bump SDK to v2026.5.12#118saditya370 wants to merge 1 commit into
saditya370 wants to merge 1 commit into
Conversation
Contributor
|
working per MCP inspector |
andrewstillv15
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new MCP tool
serviceOnCallthat 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.goserializedOnCallUserandserializedOnCall— keeps the JSON output tight:{Id, Name, Email, User?}.Useris populated when the on-call maps to an OpsLevel user; absent for external-only on-call records (e.g. PagerDuty users not in OpsLevel).serviceOnCalltaking a requiredidentifier(service id or alias). Handler resolves the service, callsservice.GetOnCalls(...), maps to the serialized form.src/go.mod/src/go.sumgithub.com/opslevel/opslevel-go/v2026fromv2026.5.6→v2026.5.12(release that includes the newOnCalltypes andService.GetOnCalls()method).Linked PRs
Test plan
go build ./...passesgo vet ./...cleango tool golangci-lint run ./...cleanserviceOnCalltool against a real account with an on-call schedule, verify both user-mapped and external-only responders surface correctly