oncall-router-mcp
oncall-router-mcp
インシデントの最初の10分を奪ってしまう三つの質問に答えるMCPサーバーです。これは誰の所有物か、誰をいつまでに起床か、runbookにはまず何を試すと書いてるのか。それに加えて、多くのツールが間違える四つ目の質問、いまの時計でどの位置にいるべきかという問いにも答えします。この問いは、誰かがチケットを開いた時からではなく、影響が始った時から計測します。
It has no runtime dependencies, no API key, no network call, no attempt to shadow. ローカルの一つのファイルを読むだけ。pytest requests was just to run the gates.
なぜ存在るのか
エスカレーションの知識は三つの場所に散らばている。誰がも更新していないwiki、現在のシフトしか知らないローテーション・ツール、そして、今の所で一番長くいる人の頭の中。午前2時になると、高いコストがのかかる数分、何かを直すことより、誰を呼ぶかを調べることに費やされてしまいます。
This server moves this knowledge into a place where the assistant can access it, and it makes the time even clear. このcodeの中に込められた設計の判断は、エスカレーション計測の原点を影響の開始としたることです。チケットを20分遅れて開いたからと、対応者に20分の余裕が生まれるわけではない。チケットの作成時刻を起算点とするツールは、黙ってそんな余裕が生されることにするしてしま。
Related MCP server: pagerduty-mcp
4つのツール
ツール | 回答 | それができないとき |
| サービスのオーナーであるチームれ、いま現在に連絡を方法 | その旨を伝、近い一致を返答ではなく候補とし示す |
| 誰をどの順に起こすかを、各ホップの期限時刻とともに | 未知の重大度を拒否し、もっとも静かなものにデフォルトするしないない |
| ランブックにチェックすべき順書かファイル | サービス般の手順のにフォールバックし、呼び出し手がわかるよう |
| いまいるは実行中ホップと、期限撤してれるもの | 明示する |
Every tool fail close. またしくたニアミっスが黙って解決されてしまうとはな。確信を込めた誤ったエスケレーション乗りは、素直な「わかりません」という言葉よりコストが掛かるからです。
各ツールが実際に返す出力は、失敗パスも含め docs/TRANSCRIPT.mdを参照えて下さい。CIがそのファイルを再生成し、コードが実際の出力とズあるまえにビルドを失敗したもの。
実行する
git clone <this repo> && cd oncall-router-mcp
python -m pip install "pytest>=7" # the only dependency, and only to run the tests
python -m pytest tests/ -q # 40 tests
PYTHONPATH=src python -m oncall_router.server --catalog catalog.tomlこれをClaude DesktopやClaude Codえ に組み込むには、MCPクライアントの設定、絶対パスで、以下を追加して下さい:
{
"mcpServers": {
"oncall-router": {
"command": "python",
"args": ["-m", "oncall_router.server", "--catalog", "/abs/path/to/catalog.toml"],
"env": { "PYTHONPATH": "/abs/path/to/oncall-router-mcp/src" }
}
}
}そのコマンドを MCP クライアントに指定します。自分のデータを使いる場合は、catalog.tomlをコピーして編集し、--catalog yours.tomlを渡して下さい。コードの変更はいла不要。カログはあくまでデータであり、テストによって同じツールを二つの異なるカタログで実行して証明している。
カタログ
One TOML file containing services, each team the own them, their ownership, eachのエスカレーション chain containing a timing, and runbook steps in each situation. YAMLはhmm: Why TOML not YAML: tomllib ships in Python standard library. Because of that, the catalog doesn't add dependency count to the project.
アリアスは見つけて重要です。インシデント中には、人は覚えているた名前をタイプするものです。gateway でも apigw でも edge でも the gateway でも、すべて api-gateway に解決されます。
これが応意図の中のせぬこと
No rich integration.とのこと: インシデントのツール、rotationツ、モニタリングを読み込むことはしない。それらは顧客ごとに決めものであり、境界の奥に仕舞がっておく。
書込み動作はない。 誰かを本に呼び出す、何かを開、状態を格納する操作は一切ない。質問に答返り、最終判断は人が行う。
同梂のカタログは架空物です。
catalog.tomlのService、チーム、handle は全部創造。雇いを特定できる情報がレポジトリ内に入ると、テストがビルドを失敗させるです。タイミングモデルは慣習であり、標準ではない: 影響の開始から累積时间を、エスカレーションが別のチームに climbするときにも、持継さします。理考え窮まい選択肢であり、唯一の正解でない Choice.
cost / latch値の記載はない。モデルの呼び出しがないからである。サーバーは定決定論的に、ローカルに動作します。
ゲート
It is structured against the rubric that fixed before the first line of code. 知っておくと得するもの:
実のクライアントがワイヤプロトコルを喋下して全ツールが答えます。テスト内で関数呼び出すだけでは終わらない。
全ツールが、「当てずっぽうではなく断む」ことを示す失敗パス・テストを持つ。
の実装が存在する前、テストが失敗すあことを観測できていた。
カタログ入り替えると、コード編集することなしに全つの答くだが変わることをテストが証明している。
コミット済みのトランスクリプトを再生成できる、さなければビルドに失敗。
クレデンシャルなし、ソースにログ記録の通信なし、雇 связи无关内容、サードパーティのインプとート、なし。このゲートはブロックします。
Available Tools
4 toolsescalation_pathA
Who to wake for this service at this severity, in order, with the minute each hop is due measured from impact start. Refuses an unknown severity rather than defaulting to the quietest one.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | ||
| severity | Yes | A severity defined by the catalog, for example sev1. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses a non-default behavior ('Refuses an unknown severity rather than defaulting to the quietest one') and describes the output nature (ordered list with minute timings). No other side effects are mentioned, but the tool appears read-only and the disclosure is sufficient for a simple query.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the core purpose and output, followed by the refusal behavior. Every word earns its place, with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with only 2 simple parameters and no output schema, the description covers the essential return value (who, order, timing) and the key behavioral nuance (refusal on unknown severity). Nothing critical is missing given the tool's simplicity, though explicit error handling for unknown service isn't described.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50% (severity has a description, service does not). The description adds significant meaning to severity: it must be a catalog-defined value and unknown ones are refused. Service is only referenced as 'this service' without additional constraints, but the schema already defines it as a string. Overall, the description compensates well for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific query (who to wake) for a defined resource (this service at this severity) and includes output order and timing. It clearly distinguishes from siblings like who_owns (ownership) and impact_clock (timing) by focusing on the escalation path itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage ('Who to wake for this service at this severity') but never explicitly says when to use this tool over siblings or when not to use it. No alternatives are named, so an agent must infer from tool names rather than get explicit routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
impact_clockB
Given when impact started, which escalation hop should be active now and which are overdue. Time is measured from impact start rather than ticket creation. Requires an explicit now timestamp: it never assumes the current time.
| Name | Required | Description | Default |
|---|---|---|---|
| now | Yes | ISO 8601. Required. | |
| service | Yes | ||
| severity | Yes | ||
| impact_start | Yes | ISO 8601, e.g. 2026-08-23T14:00:00Z |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states that the tool requires an explicit now timestamp and never assumes current time, and that it measures from impact start rather than ticket creation. This is meaningful behavioral context beyond the schema. It does not mention side effects or error conditions, but for a calculation tool this is reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences with no wasted words. It front-loads the purpose, then adds the key behavioral constraint (time basis and explicit now requirement). Each sentence contributes necessary information, making it concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and no annotations, the description offers the essential purpose and a critical behavioral constraint, but it does not describe the return format, potential error cases, or how severity/service influence the result. It gives enough to understand the intent but lacks detail for full autonomous use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50%, covering 'now' and 'impact_start' but leaving 'service' and 'severity' undocumented. The description reinforces the meaning of impact_start and now but does not explain the roles of service and severity in determining escalation hops. It fails to compensate for the missing schema descriptions, leaving those parameters ambiguous.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the core function: determining which escalation hop is active and overdue given impact start and a specified now. It also distinguishes time measurement from ticket creation, which is a specific behavioral nuance. However, it does not explicitly differentiate from sibling tools like 'escalation_path' or 'playbook', so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings. It mentions a constraint (explicit now timestamp) but does not explain when this tool is appropriate or when another might be better. There is no statement of alternatives or exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
playbookA
What the runbook says to check first. Falls back to the service's general steps when the symptom is unknown, and says so with fell_back=true.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | ||
| symptom | No | Optional, for example latency. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses a key behavioral trait: when the symptom is unknown, it falls back and reports with fell_back=true. This is valuable and goes beyond simple 'returns steps.' It also implies a read-only operation. However, it does not describe the complete return structure, error handling, or any side effects, though for a read tool this is minor.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler. The primary purpose is front-loaded, and the fallback condition is stated concisely with a concrete outcome (fell_back=true). Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given two simple parameters and no output schema or annotations, the description provides core information: what it returns conceptually, the fallback condition, and a note about a response field. It omits the exact return payload shape (e.g., list of steps vs. free text), but for a tool this straightforward, it's nearly sufficient. A tiny bit more about the output format would make it a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50% (only symptom has a description). The description adds meaning by explaining that a missing/unknown symptom triggers fallback behavior, linking symptom to the fallback logic. It clarifies the role of service indirectly via 'service's general steps.' Yet it does not elaborate on allowed values, format, or examples for either parameter beyond what the schema already states for symptom.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific action and resource: retrieving the first checks from a runbook for a service. The description clearly sets it apart from siblings (ownership, escalation, impact) by focusing on runbook guidance. However, 'what the runbook says to check first' is slightly vague about whether it returns a list, a single item, or a message, so it's not a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: use this tool when you need the runbook's first steps, and it handles unknown symptoms by falling back to general steps. It does not explicitly name alternatives or state when not to use it (e.g., if you need escalation path, use escalation_path). The fallback behavior is a form of guidance, but it lacks explicit comparisons to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
who_ownsA
Which team owns a service and how to reach them right now. Accepts the name someone would actually type during an incident, including aliases. Returns found=false with suggestions rather than guessing at a near match.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | Service name or alias. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It explicitly states 'Returns found=false with suggestions rather than guessing at a near match,' which is a valuable behavioral trait that helps the agent set expectations. It also implies a read-only lookup (no side effects mentioned), though it does not elaborate on authentication or error conditions. Overall, it adds meaningful behavioral context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the primary purpose. Every clause adds value: the first sentence defines the outcome; the second clarifies input flexibility and the non-guessing behavior. No redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one parameter, no output schema), and the description covers purpose, input semantics, and a key behavior (found=false with suggestions). It does not list the exact fields returned (e.g., team name, contact info), but 'how to reach them' implies that. Given the low complexity and lack of annotations, it is reasonably complete, though a bit more detail on the return payload would make it excellent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already describes the parameter as 'Service name or alias' with 100% coverage, so the baseline is 3. The description adds nuance by specifying 'the name someone would actually type during an incident,' which gives the agent guidance on the flexibility of input. This extra context—emphasizing natural incident-time phrasing—goes slightly beyond the schema's dry definition, justifying a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Which team owns a service and how to reach them right now.' This specifies a verb (owns), a resource (service), and the output (ownership and contact). It distinguishes itself from sibling tools (escalation_path, playbook, impact_clock) implicitly by focusing on ownership rather than escalation steps, runbooks, or timing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context—when you need to identify who owns a service—but it does not explicitly contrast with siblings or state when not to use this tool. There is no mention of alternatives like escalation_path or playbook. The behavior note about returning found=false provides some guidance, but it is not a clear when-to-use vs. when-not-to-use directive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
escalation_path - First observed
impact_clock - First observed
playbook - First observed
who_owns
TDQS
Scored across 4 tools
Each tool targets a distinct aspect of incident routing: ownership (who_owns), escalation (escalation_path), response steps (playbook), and timing (impact_clock). There is no overlap in purpose, and the descriptions make boundaries clear.
All tool names are lowercase snake_case and are descriptive, but the pattern varies slightly: who_owns is a question-like phrase, while the others are noun compounds. This is a minor inconsistency, but the naming remains intuitive and predictable.
With only 4 tools, the server is tightly scoped to incident routing. Each tool delivers a unique, essential capability without redundancy, making the count ideal for the domain.
The tool set covers the core incident routing workflow: identifying ownership, following escalation paths, accessing playbooks, and tracking escalation timing. Minor gaps like incident acknowledgment or status updates exist but are outside the router's stated purpose.
Maintenance
Related MCP Connectors
Manage incidents and on-call: list/create/update incidents, who is on call, on-call overrides.
Read incidents, services, teams, on-call schedules; acknowledge, resolve and note incidents.
Vendor status pages, TLS cert inspection, DNS propagation checks, and incident-response playbooks.
Publish Markdown incident reports, ADRs, RFCs and runbooks as web pages, with team spaces.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceMCP server for the Rootly incident management platform — alerts, incidents, on-call schedules-
- AlicenseNot gradedqualityDmaintenanceEnables PagerDuty incident response operations including listing incidents, acknowledging and resolving incidents, looking up on-call schedules, and listing services.MIT
- AlicenseNot gradedqualityBmaintenanceSelf-hosted operational dashboard and MCP server that catalogs runnable services and their operational context, offering a read-only MCP endpoint to list projects, service status, runbooks, and reconciliation context.1Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables deterministic triage of OpenShift alerts by executing YAML-defined runbooks against an upstream OCP MCP server, collecting auditable evidence bundles for LLM interpretation.-