@tellagen/mcp-server 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +335 -102
  3. package/SKILL.md +183 -27
  4. package/contracts/mcp-protocol.json +155 -0
  5. package/contracts/runbooks/manifest.json +26 -6
  6. package/contracts/runbooks/v2/cause-lead.guidance.json +37 -0
  7. package/contracts/runbooks/v2/client-protocol.json +926 -0
  8. package/contracts/runbooks/v2/client-writes.guidance.json +42 -0
  9. package/contracts/runbooks/v2/fixtures/timeline-event-blocks-rejected.json +30 -5
  10. package/contracts/runbooks/v2/result-summary.guidance.json +21 -0
  11. package/contracts/runbooks/v2/timeline-event-blocks.schema.json +18 -11
  12. package/contracts/tellagen-runbook-contracts.json +4 -4
  13. package/dist/active-run.d.ts +29 -0
  14. package/dist/active-run.js +67 -0
  15. package/dist/active-run.js.map +1 -0
  16. package/dist/bootstrap.d.ts +20 -0
  17. package/dist/bootstrap.js +29 -0
  18. package/dist/bootstrap.js.map +1 -0
  19. package/dist/cause-lead.d.ts +25 -0
  20. package/dist/cause-lead.js +145 -0
  21. package/dist/cause-lead.js.map +1 -0
  22. package/dist/cli/auth.d.ts +22 -0
  23. package/dist/cli/auth.js +207 -0
  24. package/dist/cli/auth.js.map +1 -0
  25. package/dist/cli/io.d.ts +16 -0
  26. package/dist/cli/io.js +53 -0
  27. package/dist/cli/io.js.map +1 -0
  28. package/dist/cli/listen-guard.d.ts +12 -0
  29. package/dist/cli/listen-guard.js +50 -0
  30. package/dist/cli/listen-guard.js.map +1 -0
  31. package/dist/cli/listen.d.ts +28 -0
  32. package/dist/cli/listen.js +205 -0
  33. package/dist/cli/listen.js.map +1 -0
  34. package/dist/cli/main.d.ts +3 -0
  35. package/dist/cli/main.js +53 -0
  36. package/dist/cli/main.js.map +1 -0
  37. package/dist/cli/trace-hook.d.ts +23 -0
  38. package/dist/cli/trace-hook.js +99 -0
  39. package/dist/cli/trace-hook.js.map +1 -0
  40. package/dist/client.d.ts +92 -6
  41. package/dist/client.js +300 -23
  42. package/dist/client.js.map +1 -1
  43. package/dist/config.d.ts +17 -0
  44. package/dist/config.js +38 -0
  45. package/dist/config.js.map +1 -0
  46. package/dist/credentials.d.ts +120 -0
  47. package/dist/credentials.js +363 -0
  48. package/dist/credentials.js.map +1 -0
  49. package/dist/diagnosis-structure.d.ts +207 -147
  50. package/dist/diagnosis-structure.js +143 -2
  51. package/dist/diagnosis-structure.js.map +1 -1
  52. package/dist/diff-figure.d.ts +56 -0
  53. package/dist/diff-figure.js +276 -0
  54. package/dist/diff-figure.js.map +1 -0
  55. package/dist/errors.d.ts +21 -0
  56. package/dist/errors.js +60 -0
  57. package/dist/errors.js.map +1 -1
  58. package/dist/figures.d.ts +281 -201
  59. package/dist/figures.js +189 -47
  60. package/dist/figures.js.map +1 -1
  61. package/dist/guide-resources.d.ts +28 -0
  62. package/dist/guide-resources.js +81 -0
  63. package/dist/guide-resources.js.map +1 -0
  64. package/dist/heartbeat.d.ts +24 -0
  65. package/dist/heartbeat.js +94 -0
  66. package/dist/heartbeat.js.map +1 -0
  67. package/dist/home.d.ts +8 -0
  68. package/dist/home.js +14 -0
  69. package/dist/home.js.map +1 -0
  70. package/dist/identity.d.ts +32 -0
  71. package/dist/identity.js +83 -0
  72. package/dist/identity.js.map +1 -0
  73. package/dist/index.js +46 -14
  74. package/dist/index.js.map +1 -1
  75. package/dist/listen-config.d.ts +67 -0
  76. package/dist/listen-config.js +83 -0
  77. package/dist/listen-config.js.map +1 -0
  78. package/dist/listen-probe.d.ts +57 -0
  79. package/dist/listen-probe.js +158 -0
  80. package/dist/listen-probe.js.map +1 -0
  81. package/dist/listen-rules.d.ts +88 -0
  82. package/dist/listen-rules.js +252 -0
  83. package/dist/listen-rules.js.map +1 -0
  84. package/dist/listen-settings.d.ts +18 -0
  85. package/dist/listen-settings.js +50 -0
  86. package/dist/listen-settings.js.map +1 -0
  87. package/dist/listen-wrap.d.ts +21 -0
  88. package/dist/listen-wrap.js +52 -0
  89. package/dist/listen-wrap.js.map +1 -0
  90. package/dist/listener.d.ts +195 -0
  91. package/dist/listener.js +600 -0
  92. package/dist/listener.js.map +1 -0
  93. package/dist/open-run.d.ts +2 -0
  94. package/dist/open-run.js +5 -0
  95. package/dist/open-run.js.map +1 -0
  96. package/dist/prompts.d.ts +12 -0
  97. package/dist/prompts.js +37 -0
  98. package/dist/prompts.js.map +1 -0
  99. package/dist/redact.d.ts +13 -0
  100. package/dist/redact.js +76 -0
  101. package/dist/redact.js.map +1 -0
  102. package/dist/run-events.d.ts +54 -0
  103. package/dist/run-events.js +210 -0
  104. package/dist/run-events.js.map +1 -0
  105. package/dist/run-state.d.ts +184 -0
  106. package/dist/run-state.js +207 -0
  107. package/dist/run-state.js.map +1 -0
  108. package/dist/server.d.ts +22 -2
  109. package/dist/server.js +137 -29
  110. package/dist/server.js.map +1 -1
  111. package/dist/session.d.ts +86 -0
  112. package/dist/session.js +155 -0
  113. package/dist/session.js.map +1 -0
  114. package/dist/shell-rules.d.ts +49 -0
  115. package/dist/shell-rules.js +335 -0
  116. package/dist/shell-rules.js.map +1 -0
  117. package/dist/signin-index.d.ts +164 -0
  118. package/dist/signin-index.js +116 -0
  119. package/dist/signin-index.js.map +1 -0
  120. package/dist/signin.d.ts +169 -0
  121. package/dist/signin.js +541 -0
  122. package/dist/signin.js.map +1 -0
  123. package/dist/start.d.ts +7 -6
  124. package/dist/start.js +14 -7
  125. package/dist/start.js.map +1 -1
  126. package/dist/tools/catalog.d.ts +44 -0
  127. package/dist/tools/catalog.js +105 -0
  128. package/dist/tools/catalog.js.map +1 -0
  129. package/dist/tools/causes.d.ts +6 -6
  130. package/dist/tools/causes.js +4 -5
  131. package/dist/tools/causes.js.map +1 -1
  132. package/dist/tools/context.js +5 -5
  133. package/dist/tools/context.js.map +1 -1
  134. package/dist/tools/datasources.js +1 -1
  135. package/dist/tools/datasources.js.map +1 -1
  136. package/dist/tools/diagnostics.js +2 -2
  137. package/dist/tools/diagnostics.js.map +1 -1
  138. package/dist/tools/figures.d.ts +3 -2
  139. package/dist/tools/figures.js +38 -13
  140. package/dist/tools/figures.js.map +1 -1
  141. package/dist/tools/findings.d.ts +28 -0
  142. package/dist/tools/findings.js +88 -24
  143. package/dist/tools/findings.js.map +1 -1
  144. package/dist/tools/incidents.js +5 -5
  145. package/dist/tools/incidents.js.map +1 -1
  146. package/dist/tools/index.d.ts +19 -2
  147. package/dist/tools/index.js +115 -14
  148. package/dist/tools/index.js.map +1 -1
  149. package/dist/tools/investigations.d.ts +54 -0
  150. package/dist/tools/investigations.js +370 -69
  151. package/dist/tools/investigations.js.map +1 -1
  152. package/dist/tools/next.d.ts +20 -0
  153. package/dist/tools/next.js +136 -0
  154. package/dist/tools/next.js.map +1 -0
  155. package/dist/tools/postmortem-runbooks.d.ts +52 -52
  156. package/dist/tools/postmortem-runbooks.js +3 -10
  157. package/dist/tools/postmortem-runbooks.js.map +1 -1
  158. package/dist/tools/resume.d.ts +5 -0
  159. package/dist/tools/resume.js +136 -0
  160. package/dist/tools/resume.js.map +1 -0
  161. package/dist/tools/signin.d.ts +12 -0
  162. package/dist/tools/signin.js +54 -0
  163. package/dist/tools/signin.js.map +1 -0
  164. package/dist/tools/source-links.js +5 -3
  165. package/dist/tools/source-links.js.map +1 -1
  166. package/dist/tools/timeline.js +57 -11
  167. package/dist/tools/timeline.js.map +1 -1
  168. package/dist/trace-record.d.ts +36 -0
  169. package/dist/trace-record.js +283 -0
  170. package/dist/trace-record.js.map +1 -0
  171. package/dist/version.d.ts +10 -2
  172. package/dist/version.js +20 -1
  173. package/dist/version.js.map +1 -1
  174. package/package.json +23 -3
  175. package/server.json +5 -5
  176. package/contracts/runbooks/v1/fixtures/global-runbook.json +0 -7
  177. package/contracts/runbooks/v1/runbook-definition.schema.json +0 -25
  178. package/dist/auth.d.ts +0 -7
  179. package/dist/auth.js +0 -19
  180. package/dist/auth.js.map +0 -1
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Every tool of the server, in the order a client lists them, with the
3
+ * toolset it belongs to and what it may change. The order is fixed so a
4
+ * client can cache the list.
5
+ */
6
+ export declare const TOOLSETS: readonly ["diagnosis", "incidents", "timeline", "postmortem", "settings"];
7
+ export type Toolset = (typeof TOOLSETS)[number];
8
+ /** The toolsets that are on when a person chooses nothing. */
9
+ export declare const DEFAULT_TOOLSETS: readonly Toolset[];
10
+ export declare const TOOLSET_SUMMARY: Record<Toolset, string>;
11
+ /**
12
+ * - read: changes nothing in Tellagen.
13
+ * - add: creates a record or moves a run forward; it removes nothing.
14
+ * - change: overwrites fields of an existing record, or ends a run.
15
+ */
16
+ export type ToolEffect = "read" | "add" | "change";
17
+ export interface ToolCatalogEntry {
18
+ name: string;
19
+ toolset: Toolset;
20
+ effect: ToolEffect;
21
+ /** A repeat with the same input leaves the same state. */
22
+ idempotent?: boolean;
23
+ /** The tool reaches a system other than Tellagen (a Grafana health check, an image URL). */
24
+ openWorld?: boolean;
25
+ }
26
+ export declare const TOOL_CATALOG: readonly ToolCatalogEntry[];
27
+ /** The tool that turns a toolset on. It is always listed, last. */
28
+ export declare const ENABLE_TOOLSET_TOOL = "tellagen_enable_toolset";
29
+ /** The sign-in tool. It is always listed, after the enable tool, because it must work before any setup. */
30
+ export declare const SIGN_IN_TOOL = "tellagen_sign_in";
31
+ /** The MCP annotations of a catalog entry. */
32
+ export declare function toolAnnotations(entry: ToolCatalogEntry): {
33
+ readOnlyHint: boolean;
34
+ destructiveHint: boolean;
35
+ idempotentHint: boolean;
36
+ openWorldHint: boolean;
37
+ };
38
+ export type ToolsetSelection = readonly Toolset[] | "all";
39
+ /**
40
+ * Reads a toolset list such as "diagnosis,timeline" or "all". An unknown
41
+ * name is an error that names the valid ones, so a typing mistake does not
42
+ * silently hide tools.
43
+ */
44
+ export declare function parseToolsets(value: string | undefined): ToolsetSelection;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Every tool of the server, in the order a client lists them, with the
3
+ * toolset it belongs to and what it may change. The order is fixed so a
4
+ * client can cache the list.
5
+ */
6
+ export const TOOLSETS = ["diagnosis", "incidents", "timeline", "postmortem", "settings"];
7
+ /** The toolsets that are on when a person chooses nothing. */
8
+ export const DEFAULT_TOOLSETS = ["diagnosis", "incidents"];
9
+ export const TOOLSET_SUMMARY = {
10
+ diagnosis: "Run a diagnosis: find and pick up a run, post trace steps, checks, causes and findings, build figures and source links, and complete the run.",
11
+ incidents: "Read and edit incidents, services, impact and affected customers, search, start a run, and read an incident's runs and findings.",
12
+ timeline: "Read and edit timeline events and comments, and promote a finding to the timeline.",
13
+ postmortem: "Postmortem revision proposals, legacy postmortem imports and runbook candidates from a postmortem.",
14
+ settings: "Setup checks (data source probe, MCP tool check sessions) and run inspection (trace steps, matched runbooks, waivers, scope).",
15
+ };
16
+ export const TOOL_CATALOG = [
17
+ // diagnosis
18
+ { name: "tellagen_next_investigation", toolset: "diagnosis", effect: "read" },
19
+ { name: "tellagen_pick_up_investigation", toolset: "diagnosis", effect: "add", idempotent: true },
20
+ { name: "tellagen_resume", toolset: "diagnosis", effect: "add", idempotent: true },
21
+ { name: "tellagen_get_incident_context", toolset: "diagnosis", effect: "read" },
22
+ { name: "tellagen_post_trace_step", toolset: "diagnosis", effect: "add", idempotent: true },
23
+ { name: "tellagen_post_runbook_check_attempt", toolset: "diagnosis", effect: "add", idempotent: true },
24
+ { name: "tellagen_update_cause", toolset: "diagnosis", effect: "change", idempotent: true },
25
+ { name: "tellagen_post_finding", toolset: "diagnosis", effect: "add" },
26
+ { name: "tellagen_update_finding", toolset: "diagnosis", effect: "change" },
27
+ { name: "tellagen_build_figure", toolset: "diagnosis", effect: "read" },
28
+ { name: "tellagen_build_source_link", toolset: "diagnosis", effect: "read" },
29
+ { name: "tellagen_get_context_attachment", toolset: "diagnosis", effect: "read" },
30
+ { name: "tellagen_get_investigation_coverage", toolset: "diagnosis", effect: "read" },
31
+ { name: "tellagen_post_timeline_event", toolset: "diagnosis", effect: "add" },
32
+ { name: "tellagen_complete_investigation", toolset: "diagnosis", effect: "change" },
33
+ // incidents
34
+ { name: "tellagen_list_incidents", toolset: "incidents", effect: "read" },
35
+ { name: "tellagen_get_incident", toolset: "incidents", effect: "read" },
36
+ { name: "tellagen_get_incident_timeline", toolset: "incidents", effect: "read" },
37
+ { name: "tellagen_create_incident", toolset: "incidents", effect: "add" },
38
+ { name: "tellagen_update_incident", toolset: "incidents", effect: "change" },
39
+ { name: "tellagen_search", toolset: "incidents", effect: "read" },
40
+ { name: "tellagen_list_services", toolset: "incidents", effect: "read" },
41
+ { name: "tellagen_get_service", toolset: "incidents", effect: "read" },
42
+ { name: "tellagen_get_impact_summary", toolset: "incidents", effect: "read" },
43
+ { name: "tellagen_list_affected_customers", toolset: "incidents", effect: "read" },
44
+ { name: "tellagen_start_investigation", toolset: "incidents", effect: "add" },
45
+ { name: "tellagen_list_investigation_runs", toolset: "incidents", effect: "read" },
46
+ { name: "tellagen_get_investigation_workspace", toolset: "incidents", effect: "read" },
47
+ { name: "tellagen_list_findings", toolset: "incidents", effect: "read" },
48
+ { name: "tellagen_get_finding", toolset: "incidents", effect: "read" },
49
+ // timeline
50
+ { name: "tellagen_get_timeline_event", toolset: "timeline", effect: "read" },
51
+ { name: "tellagen_update_timeline_event", toolset: "timeline", effect: "change" },
52
+ { name: "tellagen_list_timeline_comments", toolset: "timeline", effect: "read" },
53
+ { name: "tellagen_add_timeline_comment", toolset: "timeline", effect: "add" },
54
+ { name: "tellagen_promote_finding", toolset: "timeline", effect: "add" },
55
+ // postmortem
56
+ { name: "tellagen_get_postmortem_revision_request", toolset: "postmortem", effect: "read" },
57
+ { name: "tellagen_submit_postmortem_revision_proposal", toolset: "postmortem", effect: "add" },
58
+ { name: "tellagen_post_postmortem", toolset: "postmortem", effect: "add" },
59
+ { name: "tellagen_update_postmortem", toolset: "postmortem", effect: "add" },
60
+ { name: "tellagen_get_postmortem_analysis_request", toolset: "postmortem", effect: "read" },
61
+ { name: "tellagen_submit_postmortem_runbook_candidates", toolset: "postmortem", effect: "add" },
62
+ // settings
63
+ { name: "tellagen_probe_datasource", toolset: "settings", effect: "read", openWorld: true },
64
+ { name: "tellagen_get_diagnostic_session", toolset: "settings", effect: "read" },
65
+ { name: "tellagen_report_diagnostic_tools", toolset: "settings", effect: "add" },
66
+ { name: "tellagen_list_trace_steps", toolset: "settings", effect: "read" },
67
+ { name: "tellagen_list_runbooks", toolset: "settings", effect: "read" },
68
+ { name: "tellagen_list_investigation_runbook_waivers", toolset: "settings", effect: "read" },
69
+ { name: "tellagen_update_investigation_scope", toolset: "settings", effect: "change" },
70
+ ];
71
+ /** The tool that turns a toolset on. It is always listed, last. */
72
+ export const ENABLE_TOOLSET_TOOL = "tellagen_enable_toolset";
73
+ /** The sign-in tool. It is always listed, after the enable tool, because it must work before any setup. */
74
+ export const SIGN_IN_TOOL = "tellagen_sign_in";
75
+ /** The MCP annotations of a catalog entry. */
76
+ export function toolAnnotations(entry) {
77
+ const readOnly = entry.effect === "read";
78
+ return {
79
+ readOnlyHint: readOnly,
80
+ destructiveHint: entry.effect === "change",
81
+ idempotentHint: readOnly || entry.idempotent === true,
82
+ openWorldHint: entry.openWorld === true,
83
+ };
84
+ }
85
+ /**
86
+ * Reads a toolset list such as "diagnosis,timeline" or "all". An unknown
87
+ * name is an error that names the valid ones, so a typing mistake does not
88
+ * silently hide tools.
89
+ */
90
+ export function parseToolsets(value) {
91
+ const names = (value ?? "")
92
+ .split(",")
93
+ .map((name) => name.trim().toLowerCase())
94
+ .filter((name) => name.length > 0);
95
+ if (names.length === 0)
96
+ return DEFAULT_TOOLSETS;
97
+ if (names.includes("all"))
98
+ return "all";
99
+ const unknown = names.filter((name) => !TOOLSETS.includes(name));
100
+ if (unknown.length > 0) {
101
+ throw new Error(`Unknown toolset ${unknown.map((name) => `"${name.slice(0, 40)}"`).join(", ")}. Use all, or a comma-separated list of: ${TOOLSETS.join(", ")}.`);
102
+ }
103
+ return TOOLSETS.filter((toolset) => names.includes(toolset));
104
+ }
105
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/tools/catalog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAU,CAAC;AAGlG,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAAuB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,eAAe,GAA4B;IACtD,SAAS,EACP,+IAA+I;IACjJ,SAAS,EACP,kIAAkI;IACpI,QAAQ,EAAE,oFAAoF;IAC9F,UAAU,EAAE,oGAAoG;IAChH,QAAQ,EACN,+HAA+H;CAClI,CAAC;AAmBF,MAAM,CAAC,MAAM,YAAY,GAAgC;IACvD,YAAY;IACZ,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE;IAC7E,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;IACjG,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;IAClF,EAAE,IAAI,EAAE,+BAA+B,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE;IAC/E,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;IAC3F,EAAE,IAAI,EAAE,qCAAqC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;IACtG,EAAE,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AC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,4CAA4C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAChJ,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/D,CAAC"}
@@ -4,7 +4,7 @@ import { TellagenClient } from "../client.js";
4
4
  /** The causes endpoint limits. */
5
5
  export declare const CAUSE_STATES: readonly ["leading", "open", "ruled_out"];
6
6
  export declare const updateCauseInputShape: {
7
- investigation_run_id: z.ZodString;
7
+ investigation_run_id: z.ZodOptional<z.ZodString>;
8
8
  cause_key: z.ZodString;
9
9
  label: z.ZodOptional<z.ZodString>;
10
10
  state: z.ZodOptional<z.ZodEnum<["leading", "open", "ruled_out"]>>;
@@ -15,7 +15,7 @@ export declare const updateCauseInputShape: {
15
15
  sources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
16
  };
17
17
  declare const updateCauseSchema: z.ZodObject<{
18
- investigation_run_id: z.ZodString;
18
+ investigation_run_id: z.ZodOptional<z.ZodString>;
19
19
  cause_key: z.ZodString;
20
20
  label: z.ZodOptional<z.ZodString>;
21
21
  state: z.ZodOptional<z.ZodEnum<["leading", "open", "ruled_out"]>>;
@@ -26,20 +26,20 @@ declare const updateCauseSchema: z.ZodObject<{
26
26
  sources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
27
  }, "strict", z.ZodTypeAny, {
28
28
  cause_key: string;
29
- investigation_run_id: string;
30
- label?: string | undefined;
31
29
  state?: "open" | "ruled_out" | "leading" | undefined;
30
+ label?: string | undefined;
32
31
  finding_ids?: number[] | undefined;
32
+ investigation_run_id?: string | undefined;
33
33
  rationale?: string | undefined;
34
34
  evidence_for?: number | undefined;
35
35
  evidence_against?: number | undefined;
36
36
  sources?: string[] | undefined;
37
37
  }, {
38
38
  cause_key: string;
39
- investigation_run_id: string;
40
- label?: string | undefined;
41
39
  state?: "open" | "ruled_out" | "leading" | undefined;
40
+ label?: string | undefined;
42
41
  finding_ids?: number[] | undefined;
42
+ investigation_run_id?: string | undefined;
43
43
  rationale?: string | undefined;
44
44
  evidence_for?: number | undefined;
45
45
  evidence_against?: number | undefined;
@@ -1,13 +1,11 @@
1
1
  import { z } from "zod";
2
+ import { optionalRunIdSchema, resolveRunId } from "../active-run.js";
2
3
  import { formatError } from "../errors.js";
3
4
  import { DIAGNOSIS_STRUCTURE_CAPABILITY, supportsDiagnosisStructure, } from "../diagnosis-structure.js";
4
5
  /** The causes endpoint limits. */
5
6
  export const CAUSE_STATES = ["leading", "open", "ruled_out"];
6
7
  export const updateCauseInputShape = {
7
- investigation_run_id: z
8
- .string()
9
- .min(1)
10
- .describe("Active investigation run ID"),
8
+ investigation_run_id: optionalRunIdSchema,
11
9
  cause_key: z
12
10
  .string()
13
11
  .min(1)
@@ -62,7 +60,8 @@ export function registerCauseTools(server, client) {
62
60
  inputSchema: updateCauseInputShape,
63
61
  }, async (input) => {
64
62
  try {
65
- const { investigation_run_id, cause_key, ...fields } = input;
63
+ const { investigation_run_id: givenRunId, cause_key, ...fields } = input;
64
+ const investigation_run_id = resolveRunId(client, givenRunId);
66
65
  if (!(await supportsDiagnosisStructure(client, investigation_run_id))) {
67
66
  return {
68
67
  content: [
@@ -1 +1 @@
1
- {"version":3,"file":"causes.js","sourceRoot":"","sources":["../../src/tools/causes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AAEnC,kCAAkC;AAClC,MAAM,CAAC,MAAM,YAA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C,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -6,7 +6,7 @@ function withQuery(path, params) {
6
6
  }
7
7
  export function registerContextTools(server, client) {
8
8
  server.registerTool("tellagen_get_impact_summary", {
9
- description: "Get Tellagen's customer-impact summary for an incident.",
9
+ description: "Read the customer-impact summary of an incident. For the individual customers, use tellagen_list_affected_customers. It changes nothing.",
10
10
  inputSchema: {
11
11
  incident_id: z.number().int().positive().describe("Incident ID"),
12
12
  },
@@ -25,7 +25,7 @@ export function registerContextTools(server, client) {
25
25
  }
26
26
  });
27
27
  server.registerTool("tellagen_list_affected_customers", {
28
- description: "List affected customers for an incident, with optional status/email filters and pagination.",
28
+ description: "List the customers affected by an incident, with optional status and email filters and pagination. For totals, use tellagen_get_impact_summary. It changes nothing.",
29
29
  inputSchema: {
30
30
  incident_id: z.number().int().positive().describe("Incident ID"),
31
31
  status: z.string().optional(),
@@ -57,7 +57,7 @@ export function registerContextTools(server, client) {
57
57
  }
58
58
  });
59
59
  server.registerTool("tellagen_search", {
60
- description: "Search Tellagen incidents, timeline events, issues, services, and related workspace records.",
60
+ description: "Search the workspace for incidents, timeline events, issues, services and related records. Use it when you do not know an ID. Returns matching records with their types. It changes nothing.",
61
61
  inputSchema: {
62
62
  q: z.string().min(2).optional().describe("Search query"),
63
63
  filters: z.string().optional().describe("Advanced filter string"),
@@ -102,7 +102,7 @@ export function registerContextTools(server, client) {
102
102
  }
103
103
  });
104
104
  server.registerTool("tellagen_list_services", {
105
- description: "List services in the Tellagen service catalog.",
105
+ description: "List the services in the Tellagen service catalog. Use it to find a service ID. For one entry, call tellagen_get_service. It changes nothing.",
106
106
  inputSchema: {
107
107
  include_archived: z.boolean().optional(),
108
108
  },
@@ -124,7 +124,7 @@ export function registerContextTools(server, client) {
124
124
  }
125
125
  });
126
126
  server.registerTool("tellagen_get_service", {
127
- description: "Get one Tellagen service catalog entry by ID.",
127
+ description: "Read one service catalog entry by ID, with its metadata. It changes nothing.",
128
128
  inputSchema: {
129
129
  service_id: z.number().int().positive().describe("Service ID"),
130
130
  },
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,SAAS,SAAS,CAAC,IAAY,EAAE,MAAuB;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAChC,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MAAsB;IAEtB,MAAM,CAAC,YAAY,CACjB,6BAA6B,EAC7B;QACE,WAAW,EACT,yDAAyD;QAC3D,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;SACjE;KACF,EACD,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;QACxB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,qBAAqB,WAAW,iBAAiB,CAClD,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;aACjE,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW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ACb,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -6,7 +6,7 @@ const DEFAULT_GRAFANA_ENV_VARS = [
6
6
  ];
7
7
  export function registerDatasourceTools(server, client) {
8
8
  server.registerTool("tellagen_probe_datasource", {
9
- description: "Run a local read-only diagnostic for a Tellagen datasource. For Grafana, checks required local environment variables and calls Grafana /api/health without returning credentials.",
9
+ description: "Check the local setup of a datasource that Tellagen lists, before you query it. For Grafana it checks the required environment variables and calls the /api/health endpoint. Returns ok, the checks that ran, the names of missing environment variables and a recommended action. It is read-only and never returns credentials.",
10
10
  inputSchema: {
11
11
  datasource_id: z
12
12
  .number()
@@ -1 +1 @@
1
- {"version":3,"file":"datasources.js","sourceRoot":"","sources":["../../src/tools/datasources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA+C3C,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,+BAA+B;CAChC,CAAC;AAEF,MAAM,UAAU,uBAAuB,CACrC,MAAiB,EACjB,MAAsB;IAEtB,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B;QACE,WAAW,EACT,mLAAmL;QACrL,WAAW,EAAE;YACX,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,QAAQ,EAAE;iBACV,QAAQ,EAAE;iBACV,QAAQ,CAAC,6BAA6B,CAAC;YAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAC9D,UAAU,EAAE,CAAC;iBAC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@@ -53,7 +53,7 @@ const diagnosticReportSchema = z.object({
53
53
  });
54
54
  export function registerDiagnosticTools(server, client) {
55
55
  server.registerTool("tellagen_get_diagnostic_session", {
56
- description: "Read a Tellagen MCP diagnostic session. Use this for diag_* IDs; do not pass diag_* IDs to investigation-run tools.",
56
+ description: "Read an MCP diagnostic session by its diag_* ID. Use it only for diag_* IDs; investigation-run tools reject them. To send the result of your check, call tellagen_report_diagnostic_tools. It changes nothing.",
57
57
  inputSchema: {
58
58
  diagnostic_session_id: z
59
59
  .string()
@@ -75,7 +75,7 @@ export function registerDiagnosticTools(server, client) {
75
75
  }
76
76
  });
77
77
  server.registerTool("tellagen_report_diagnostic_tools", {
78
- description: "Post sanitized MCP tool availability and access reports to a Tellagen diagnostic session after the local LLM checks visible MCP tools.",
78
+ description: "Report which MCP tools are visible and usable to a diagnostic session (diag_* ID), after you have checked them. Send only sanitized names and access results, never credentials. It does not start or change an investigation run.",
79
79
  inputSchema: {
80
80
  diagnostic_session_id: z
81
81
  .string()
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/tools/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,IAAI;IACJ,cAAc;IACd,cAAc;IACd,eAAe;IACf,aAAa;IACb,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAE7E,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CA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BACrB,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,kEAAkE,CAAC;YAC/E,OAAO,EAAE,CAAC;iBACP,KAAK,CAAC,sBAAsB,CAAC;iBAC7B,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,6CAA6C,CAAC;SAC3D;KACF,EACD,KAAK,EAAE,EAAE,qBAAqB,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3C,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAC5B,8CAA8C,qBAAqB,UAAU,EAC7E,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,CACpD,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;aACjE,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB,CAAC,MAA6B;IAC9D,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,qBAAqB,CAAC;IACvE,OAAO;QACL,GAAG,MAAM;QACT,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE;QACvC,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,WAAW,EAAE,UAAU;KACxB,CAAC;AACJ,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { TellagenClient } from "../client.js";
2
3
  export declare const FIGURE_GUIDE_URI = "resource://tellagen/figure-guide";
3
4
  /** Added to the server instructions so every agent knows figures exist. */
4
5
  export declare const FIGURE_INSTRUCTIONS = "Figures: Tellagen draws typed widgets (stats, compare, trend, table, checks, changes, range_overlap, histogram, run_history, diff) from data you send, in the Diagnosis tab, on the timeline and in the postmortem. Use tellagen_build_figure to turn the numbers you read from a tool result into a figure Tellagen accepts: it puts a time series on an even grid of at most 500 points, turns deploy, alert and rollback times into marks, turns cumulative histogram buckets into bucket counts, maps a GitHub Actions run list to a run history, and enforces every limit. Attach the result as a causal step's figure or as a block on a timeline event. A figure owns its numbers: never repeat them in prose, never invent one, and keep units in the unit field. Read resource://tellagen/figure-guide to choose the widget that fits the question and to learn how to plot data on it.";
5
- export declare const FIGURE_GUIDE = "# Tellagen figures\n\nA figure is a small typed widget that Tellagen draws for you. You send the data. Tellagen draws it the same way in the Diagnosis tab, on the timeline and in the postmortem, and a responder can pin one from one place to another.\n\nUse tellagen_build_figure to make one. It reshapes the numbers you already read from a tool result and checks them against Tellagen's limits before you send anything. It has no data of its own.\n\n## Rules every figure follows\n\n1. A figure owns its numbers. The sentence next to it says what happened and why. It does not repeat the numbers.\n2. Never invent a number. Every value comes from a tool result you can cite. If you do not have the value, leave that row, figure or block out.\n3. Units go in the unit field, once. Do not put them inside a number, and do not repeat them in every label.\n4. One figure per causal step, under the step it proves. A step with no good figure carries none.\n5. Say where the data came from. A trend carries its query in source. For other figures, cite the tool result in the step's evidence refs.\n6. A tone is a meaning, not emphasis: good for healthy or recovered, warn for needs attention, bad for failing, neutral for a plain fact.\n7. The limits below are enforced. A figure over a limit is rejected with the field named. Shorten the data yourself. Do not expect it to be trimmed.\n\n## Pick the widget by the question\n\n| The question | Widget | Step figure | Timeline block | Limits |\n| --- | --- | --- | --- | --- |\n| What are the few numbers that matter? | stats | yes | yes | 1 to 4 items, label 48, value 32, caption 64 |\n| Did it get better, and is it inside the line? | compare | yes | yes | 1 to 8 rows, 3 details per row |\n| When did it start, and what happened around then? | trend | yes | yes | 2 to 500 points, 3 marks |\n| Which items rank highest? | table | no | yes | 1 to 6 columns, 1 to 12 rows, cell 64 |\n| Which checks passed, failed or did not run? | checks | yes | yes | 1 to 12 items, label 80, detail 160 |\n| What moved from one thing to another? | changes | no | yes | 1 to 8 rows, from and to 80, note 160 |\n| Where do two or more ranges meet? | range_overlap | yes | yes | 2 to 4 rows, label 80, unit 12 |\n| Did the slow tail move, when the average did not? | histogram | yes | yes | 3 to 61 edges (2 to 60 buckets), one count per bucket |\n| Which build broke, and which fixed it? | run_history | yes | yes | 2 to 30 runs, 4 marks, ref 80, sha 64, job 80, url 500 |\n| What exactly changed in the code? | diff | yes | yes | path 200, ref 64, 1 to 6 hunks, 12 lines in all, line 160 |\n\n## How to plot data on each widget\n\n### compare: before and after\n\nUse it for a value measured before and after a deploy, rollback, fix or config change. One row per host, route, query or job, biggest movers first.\n\n1. Pick two windows of the same length, one before the change and one after. Run the same query on both.\n2. Take one number per row from each window, for example the p95 over the window.\n3. Set unit once. Set better to lower or higher. Add a threshold for the SLO or alert line.\n\n { \"type\": \"compare\", \"title\": \"p95 latency by route\", \"unit\": \"ms\", \"better\": \"lower\",\n \"threshold\": { \"value\": 500, \"label\": \"SLO 500 ms\" },\n \"rows\": [ { \"label\": \"POST /checkout\", \"before\": 180, \"after\": 640 },\n { \"label\": \"GET /cart\", \"before\": 95, \"after\": 110 } ] }\n\nA distribution is a compare of percentiles: use p50, p95 and p99 as rows, with the SLO as the threshold.\n\n### trend: a series over time\n\nUse it when the evidence is how a value moved. Send the raw samples as points and the times of the events that explain the shape as events.\n\n1. Run a range query. Keep the time and the value of every sample.\n2. Send them as points with t and v. t is an ISO time or Unix time in seconds or milliseconds. v may be a numeric string, as Prometheus returns it. A null or NaN is skipped.\n3. Tellagen puts the points on an even grid of at most max_points (default 240, most 500) and sets start and step_seconds. Samples that share a step combine with reduce. Use max for error rate and latency so a spike survives, mean for a smooth rate.\n4. Add up to three events: a deploy, an alert, a rollback. They become marks at the right index. An event outside the range is left out and reported.\n5. Fill source with kind, datasource, query and step.\n\n { \"type\": \"trend\", \"title\": \"5xx share of requests\", \"unit\": \"%\", \"reduce\": \"max\",\n \"points\": [ { \"t\": \"2026-11-02T14:00:00Z\", \"v\": \"0.24\" }, { \"t\": \"2026-11-02T14:01:00Z\", \"v\": \"0.27\" } ],\n \"events\": [ { \"at\": \"2026-11-02T14:42:00Z\", \"label\": \"Deploy\" }, { \"at\": \"2026-11-02T15:28:00Z\", \"label\": \"Rollback\" } ],\n \"threshold\": { \"value\": 1, \"label\": \"SLO 1%\" },\n \"source\": { \"kind\": \"promql\", \"datasource\": \"prometheus\", \"query\": \"sum(rate(...))\", \"step\": \"1m\" } }\n\nIf the values are already on an even grid, send series with start and step_seconds, and marks by index. Empty steps are filled with a straight line and reported, so say so in the step when it matters.\n\n### stats: the few numbers that matter\n\nUp to four. Each has a short label, a value, a caption that says what it is measured on, and a tone.\n\n { \"type\": \"stats\", \"items\": [ { \"label\": \"Failed e2e tests\", \"value\": \"1 of 121\", \"caption\": \"master, Oct 30\", \"tone\": \"bad\" } ] }\n\n### table: a ranked list\n\nTop queries, failing routes, slowest endpoints. Give columns, then one cell per column in every row. Numbers are written as text. Keep each cell under 64 characters.\n\n### checks: pass or fail per check\n\nA recovery checklist or a CI job list. Put failures first. The block holds 12 items, so for a larger list send every failure and the checks that matter, and give the counts of the rest in the step.\n\n { \"type\": \"checks\", \"title\": \"Jobs on run 41289327533\",\n \"items\": [ { \"label\": \"Frontend Tests\", \"state\": \"fail\", \"detail\": \"1 failed of 13516\" }, { \"label\": \"E2E Tests\", \"state\": \"pass\" } ] }\n\n### changes: a value that moved\n\nA setting, a version, a limit. Each row has a label and a from, a to, or both, with an optional note.\n\n### range_overlap: ranges that meet\n\nUse it when the cause is two ranges meeting: layout offsets, a maintenance window against an error spike, memory or port ranges. Two to four rows, each with a label, a from and a to (from not above to), all in one unit.\n\n1. Read each range from a tool result: the config, the layout, the window times as numbers.\n2. Send min and max for the whole range when you want an overview strip, and every row must fall inside them. Leave out window: Tellagen zooms to the overlap.\n3. Never send the overlap itself. Tellagen computes it, and the builder tells you what it is in summary.\n\n { \"type\": \"range_overlap\", \"title\": \"Header and sticky bar\", \"unit\": \"px\",\n \"rows\": [ { \"label\": \"Header\", \"from\": 0, \"to\": 153 }, { \"label\": \"Sticky bar\", \"from\": 149, \"to\": 197 } ] }\n\n### histogram: a distribution before and after\n\nUse it when an average hides a slow tail. Send bucket counts for two equal windows. Tellagen computes p50, p95, p99 and the share over the threshold from the buckets, so never send percentiles.\n\n1. Run the bucket query on a window before the change and on one of the same length after it, for example sum by (le) (increase(http_request_duration_seconds_bucket{service=\"checkout\"}[30m])) at the end of each window.\n2. Send the result as buckets: one entry per le with the cumulative before and after counts, as Prometheus returns them, numeric strings and \"+Inf\" included.\n3. The builder turns them into edges (lower_edge, default 0, then every finite le) and one count per bucket. Observations above the last finite le have no bucket: the builder rejects them unless you set overflow to drop, and then you say so in the step.\n4. Add the SLO as threshold, in the unit of the le values.\n\n { \"type\": \"histogram\", \"title\": \"Checkout latency\", \"unit\": \"s\",\n \"buckets\": [ { \"le\": \"0.1\", \"before\": \"820\", \"after\": \"610\" }, { \"le\": \"0.5\", \"before\": \"990\", \"after\": \"800\" },\n { \"le\": \"1\", \"before\": \"1000\", \"after\": \"940\" }, { \"le\": \"+Inf\", \"before\": \"1000\", \"after\": \"940\" } ],\n \"threshold\": { \"value\": 0.5, \"label\": \"SLO 500 ms\" } }\n\nIf you already have per-bucket counts, send edges, before and after instead: before and after hold exactly one count per bucket (one fewer than edges), none negative.\n\n### run_history: CI builds, jobs, canaries or deploys\n\nUse it for a regression in CI or a bad deploy. Runs go oldest first, each with a ref, a result (success, failure, cancelled, pending), and the failing job when one failed.\n\n1. List the workflow runs of the branch around the failure: the GitHub Actions REST list, the GitHub MCP list of workflow runs, or gh run list --json number,databaseId,headSha,conclusion,status,createdAt,startedAt,event,url.\n2. Send them as github_runs, as they came. The builder maps each run: ref #run_number, the head sha, the start time, the event as trigger, the run page as url, and the conclusion as result (timed_out and startup_failure count as failure). A run whose conclusion is skipped, neutral, stale or action_required has no result: leave it out or send runs yourself. Runs are put oldest first by time.\n3. Add job to the failing runs: the name of the job that failed, from the run's jobs list.\n4. Add marks for the change that broke it (change_ref regression) and the one that fixed it (fix). Give the sha of the change and the builder places the mark before the first run built from it, or give between with the refs of the two neighbouring runs. change_ref may be a change_refs role: regression_source and first_bad become regression, fix stays fix, others become change.\n5. Set repo to owner/name so each run links to its page, and an optional span such as { \"from\": \"#4151\", \"to\": \"#4163\", \"label\": \"E2E Tests failed\" }.\n\n { \"type\": \"run_history\", \"title\": \"E2E on master\", \"repo\": \"acme/shop\", \"branch\": \"master\",\n \"github_runs\": [ { \"run_number\": 4150, \"head_sha\": \"9f2c1e0\", \"conclusion\": \"success\", \"created_at\": \"2026-10-30T08:00:00Z\", \"event\": \"push\" },\n { \"run_number\": 4151, \"head_sha\": \"4b7a2d1\", \"conclusion\": \"failure\", \"created_at\": \"2026-10-30T09:00:00Z\", \"event\": \"push\", \"job\": \"E2E Tests\" } ],\n \"marks\": [ { \"sha\": \"4b7a2d1\", \"change_ref\": \"regression\", \"title\": \"Move the header to a sticky layout\" } ] }\n\n### diff: the change that broke or fixed it\n\nUse it for the lines that matter in the change, not the whole diff.\n\n1. Read the commit or pull request file from GitHub. additions and deletions are the size of the whole change, from the commit or the pull request, never counted by you from a part of it.\n2. Send the file's patch as patch: the builder keeps its + and - lines, one hunk per @@ header. It must have at most 12 such lines in at most 6 hunks; otherwise copy the lines that show the change into hunks yourself, as they are, indentation kept.\n3. Set path, ref (the commit sha) and repo.\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 14, \"deletions\": 3,\n \"hunks\": [ [ { \"op\": \"-\", \"text\": \" position: static;\" }, { \"op\": \"+\", \"text\": \" position: sticky;\" } ] ] }\n\n## Where the figure goes\n\n- A causal step: set it as figure on the step in result_summary.causal_paths. Every type except table and changes is allowed there, at most 16 KB. This needs the diagnosis structure, which the pickup advertises as diagnosis_structure_v1. A Tellagen that does not know a figure type yet drops the figure and says so in the completion warnings (figure_invalid).\n- A timeline event: put it in blocks on tellagen_post_timeline_event or tellagen_update_timeline_event. Any type is allowed, up to 12 per event. An update replaces the whole array, so send every block you want to keep, and [] clears them. Set slot to summary to draw the block above the note, or anchor to the exact heading text it sits under. Not both. Set postmortem to false to keep a block out of the postmortem.\n\nCall tellagen_build_figure with placement step_figure or timeline_block, and use the block it returns as it is.\n\n## Getting the data from other servers\n\n- Grafana or Prometheus: a range query returns time and value pairs. Send them as points. Run the same query on two equal windows for a compare.\n- Loki: a count over time by step is a trend. A count by label over two windows is a compare.\n- Prometheus histograms: the _bucket series summed by le over two equal windows are a histogram. Send them as buckets.\n- GitHub Actions: failed jobs of one run go in checks, failures first. The runs of a branch are a run_history: send the run list as github_runs.\n- GitHub commits and pull requests: the lines that broke or fixed it are a diff. Send the file's patch, and the change's additions and deletions.\n- Kubernetes: restarts or ready counts before and after are a compare, a list of pods is a table.\n\n## If Tellagen rejects a figure\n\nThe builder names the field. For a timeline block the API answers 400 invalid_block with field and details.errors. Fix exactly those fields and send once more. Do not drop a figure to get past an error unless the data in it is not real.\n";
6
- export declare function registerFigureTools(server: McpServer): void;
6
+ export declare const FIGURE_GUIDE = "# Tellagen figures\n\nA figure is a small typed widget that Tellagen draws for you. You send the data. Tellagen draws it the same way in the Diagnosis tab, on the timeline and in the postmortem, and a responder can pin one from one place to another.\n\nUse tellagen_build_figure to make one. It reshapes the numbers you already read from a tool result and checks them against Tellagen's limits before you send anything. It has no data of its own.\n\n## Rules every figure follows\n\n1. A figure owns its numbers. The sentence next to it says what happened and why. It does not repeat the numbers.\n2. Never invent a number. Every value comes from a tool result you can cite. If you do not have the value, leave that row, figure or block out.\n3. Units go in the unit field, once. Do not put them inside a number, and do not repeat them in every label.\n4. One figure per causal step, under the step it proves. A step with no good figure carries none.\n5. Say where the data came from. A trend carries its query in source. For other figures, cite the tool result in the step's evidence refs.\n6. A tone is a meaning, not emphasis: good for healthy or recovered, warn for needs attention, bad for failing, neutral for a plain fact.\n7. The limits below are enforced. A figure over a limit is rejected with the field named. Shorten the data yourself. Do not expect it to be trimmed.\n\n## Pick the widget by the question\n\n| The question | Widget | Step figure | Timeline block | Limits |\n| --- | --- | --- | --- | --- |\n| What are the few numbers that matter? | stats | yes | yes | 1 to 8 items (4 or fewer is best), title 80, label 48, value 32, caption 64 |\n| Did it get better, and is it inside the line? | compare | yes | yes | 1 to 8 rows, 3 details per row |\n| When did it start, and what happened around then? | trend | yes | yes | 2 to 500 points, 3 marks |\n| Which items rank highest? | table | no | yes | 1 to 6 columns, 1 to 12 rows, cell 64 |\n| Which checks passed, failed or did not run? | checks | yes | yes | 1 to 12 items, label 80, detail 160 |\n| What moved from one thing to another? | changes | no | yes | 1 to 8 rows, from and to 80, note 160 |\n| Where do two or more ranges meet? | range_overlap | yes | yes | 2 to 4 rows, label 80, unit 12 |\n| Did the slow tail move, when the average did not? | histogram | yes | yes | 3 to 61 edges (2 to 60 buckets), one count per bucket |\n| Which build broke, and which fixed it? | run_history | yes | yes | 2 to 30 runs, runs_not_shown, 4 marks, ref 80, sha 64, job 80, url 500 |\n| What exactly changed in the code? | diff | yes | yes | path 200, ref 64, 1 to 6 hunks, 12 changed lines in all, line 160 |\n\n## How to plot data on each widget\n\n### compare: before and after\n\nUse it for a value measured before and after a deploy, rollback, fix or config change. One row per host, route, query or job, biggest movers first.\n\n1. Pick two windows of the same length, one before the change and one after. Run the same query on both.\n2. Take one number per row from each window, for example the p95 over the window.\n3. Set unit once. Set better to lower or higher. Add a threshold for the SLO or alert line.\n\n { \"type\": \"compare\", \"title\": \"p95 latency by route\", \"unit\": \"ms\", \"better\": \"lower\",\n \"threshold\": { \"value\": 500, \"label\": \"SLO 500 ms\" },\n \"rows\": [ { \"label\": \"POST /checkout\", \"before\": 180, \"after\": 640 },\n { \"label\": \"GET /cart\", \"before\": 95, \"after\": 110 } ] }\n\nA distribution is a compare of percentiles: use p50, p95 and p99 as rows, with the SLO as the threshold.\n\n### trend: a series over time\n\nUse it when the evidence is how a value moved. Send the raw samples as points and the times of the events that explain the shape as events.\n\n1. Run a range query. Keep the time and the value of every sample.\n2. Send them as points with t and v. t is an ISO time or Unix time in seconds or milliseconds. v may be a numeric string, as Prometheus returns it. A null or NaN is skipped.\n3. Tellagen puts the points on an even grid of at most max_points (default 240, most 500) and sets start and step_seconds. Samples that share a step combine with reduce. Use max for error rate and latency so a spike survives, mean for a smooth rate.\n4. Add up to three events: a deploy, an alert, a rollback. They become marks at the right index. An event outside the range is left out and reported.\n5. Fill source with kind, datasource, query and step.\n\n { \"type\": \"trend\", \"title\": \"5xx share of requests\", \"unit\": \"%\", \"reduce\": \"max\",\n \"points\": [ { \"t\": \"2026-11-02T14:00:00Z\", \"v\": \"0.24\" }, { \"t\": \"2026-11-02T14:01:00Z\", \"v\": \"0.27\" } ],\n \"events\": [ { \"at\": \"2026-11-02T14:42:00Z\", \"label\": \"Deploy\" }, { \"at\": \"2026-11-02T15:28:00Z\", \"label\": \"Rollback\" } ],\n \"threshold\": { \"value\": 1, \"label\": \"SLO 1%\" },\n \"source\": { \"kind\": \"promql\", \"datasource\": \"prometheus\", \"query\": \"sum(rate(...))\", \"step\": \"1m\" } }\n\nIf the values are already on an even grid, send series with start and step_seconds, and marks by index. Empty steps are filled with a straight line and reported, so say so in the step when it matters.\n\n### stats: the few numbers that matter\n\nAim for four or fewer. Each has a short label, a value, a caption that says what it is measured on, and a tone. The first four are tiles in one row, so put the total first and give a tone only to the exception. Items five to eight are drawn as plain rows under the tiles. When this Tellagen lists figure_extras_v1 in server_capabilities you may also send a title (up to 80 characters) to name the tiles, for example \"Tests of the run\", and up to eight items. Pass run_id to tellagen_build_figure for this check. Without figure_extras_v1 the builder drops the title and every item after the fourth, and says so in notes, because an older Tellagen rejects them and drops the whole figure.\n\n { \"type\": \"stats\", \"items\": [ { \"label\": \"Failed e2e tests\", \"value\": \"1 of 121\", \"caption\": \"master, Oct 30\", \"tone\": \"bad\" } ] }\n\nA tile caption says what the number is measured on. The name of the source, such as \"node --test summary\", belongs in a source chip (the step's evidence refs), not in a caption.\n\n### table: a ranked list\n\nTop queries, failing routes, slowest endpoints. Give columns, then one cell per column in every row. Numbers are written as text. Keep each cell under 64 characters.\n\n### checks: pass or fail per check\n\nA recovery checklist or a CI job list. Put failures first. The block holds 12 items, so for a larger list send every failure and the checks that matter, and give the counts of the rest in the step.\n\n { \"type\": \"checks\", \"title\": \"Jobs on run 41289327533\",\n \"items\": [ { \"label\": \"Frontend Tests\", \"state\": \"fail\", \"detail\": \"1 failed of 13516\" }, { \"label\": \"E2E Tests\", \"state\": \"pass\" } ] }\n\n### changes: a value that moved\n\nA setting, a version, a limit. Each row has a label and a from, a to, or both, with an optional note.\n\n### range_overlap: ranges that meet\n\nUse it when the cause is two ranges meeting: layout offsets, a maintenance window against an error spike, memory or port ranges. Two to four rows, each with a label, a from and a to (from not above to), all in one unit.\n\n1. Read each range from a tool result: the config, the layout, the window times as numbers.\n2. Send min and max for the whole range when you want an overview strip, and every row must fall inside them. Leave out window: Tellagen zooms to the overlap.\n3. Never send the overlap itself. Tellagen computes it, and the builder tells you what it is in summary.\n\n { \"type\": \"range_overlap\", \"title\": \"Header and sticky bar\", \"unit\": \"px\",\n \"rows\": [ { \"label\": \"Header\", \"from\": 0, \"to\": 153 }, { \"label\": \"Sticky bar\", \"from\": 149, \"to\": 197 } ] }\n\n### histogram: a distribution before and after\n\nUse it when an average hides a slow tail. Send bucket counts for two equal windows. Tellagen computes p50, p95, p99 and the share over the threshold from the buckets, so never send percentiles.\n\n1. Run the bucket query on a window before the change and on one of the same length after it, for example sum by (le) (increase(http_request_duration_seconds_bucket{service=\"checkout\"}[30m])) at the end of each window.\n2. Send the result as buckets: one entry per le with the cumulative before and after counts, as Prometheus returns them, numeric strings and \"+Inf\" included.\n3. The builder turns them into edges (lower_edge, default 0, then every finite le) and one count per bucket. Observations above the last finite le have no bucket: the builder rejects them unless you set overflow to drop, and then you say so in the step.\n4. Add the SLO as threshold, in the unit of the le values.\n\n { \"type\": \"histogram\", \"title\": \"Checkout latency\", \"unit\": \"s\",\n \"buckets\": [ { \"le\": \"0.1\", \"before\": \"820\", \"after\": \"610\" }, { \"le\": \"0.5\", \"before\": \"990\", \"after\": \"800\" },\n { \"le\": \"1\", \"before\": \"1000\", \"after\": \"940\" }, { \"le\": \"+Inf\", \"before\": \"1000\", \"after\": \"940\" } ],\n \"threshold\": { \"value\": 0.5, \"label\": \"SLO 500 ms\" } }\n\nIf you already have per-bucket counts, send edges, before and after instead: before and after hold exactly one count per bucket (one fewer than edges), none negative.\n\n### run_history: CI builds, jobs, canaries or deploys\n\nUse it for a regression in CI or a bad deploy. Runs go oldest first, each with a ref, a result (success, failure, cancelled, pending), and the failing job when one failed.\n\n1. List the workflow runs of the branch around the failure: the GitHub Actions REST list, the GitHub MCP list of workflow runs, or gh run list --json number,databaseId,headSha,conclusion,status,createdAt,startedAt,event,url.\n2. Send them as github_runs, as they came. The builder maps each run: ref #run_number, the head sha, the start time, the event as trigger, the run page as url, and the conclusion as result (timed_out and startup_failure count as failure). A run whose conclusion is skipped, neutral, stale or action_required has no result: leave it out or send runs yourself. Runs are put oldest first by time.\n3. Add job to the failing runs: the name of the job that failed, from the run's jobs list.\n4. Add marks for the change that broke it (change_ref regression) and the one that fixed it (fix). Give the sha of the change and the builder places the mark before the first run built from it, or give between with the refs of the two neighbouring runs. change_ref may be a change_refs role: regression_source and first_bad become regression, fix stays fix, others become change.\n5. Set repo to owner/name so each run links to its page, and an optional span such as { \"from\": \"#4151\", \"to\": \"#4163\", \"label\": \"E2E Tests failed\" }.\n6. A history holds at most 30 runs. If yours has more, send the 30 that matter (the runs around the break and the fix, oldest first) and set runs_not_shown to how many you left out; the strip then says \"N more runs not shown.\" Only when this Tellagen lists figure_extras_v1; without it the builder drops runs_not_shown and says so in notes.\n\n { \"type\": \"run_history\", \"title\": \"E2E on master\", \"repo\": \"acme/shop\", \"branch\": \"master\",\n \"github_runs\": [ { \"run_number\": 4150, \"head_sha\": \"9f2c1e0\", \"conclusion\": \"success\", \"created_at\": \"2026-10-30T08:00:00Z\", \"event\": \"push\" },\n { \"run_number\": 4151, \"head_sha\": \"4b7a2d1\", \"conclusion\": \"failure\", \"created_at\": \"2026-10-30T09:00:00Z\", \"event\": \"push\", \"job\": \"E2E Tests\" } ],\n \"marks\": [ { \"sha\": \"4b7a2d1\", \"change_ref\": \"regression\", \"title\": \"Move the header to a sticky layout\" } ] }\n\n### diff: the change that broke or fixed it\n\nUse it for the lines of the change that broke or fixed it. A short change is sent whole.\n\n1. Read the commit or pull request file from GitHub. additions and deletions are the size of the whole change, from the commit or the pull request, never counted by you from a part of it.\n2. If the change has 12 or fewer changed lines (in at most 6 hunks), send all of them. Send the file's patch as patch: the builder keeps every line, one hunk per @@ header.\n3. If it has more, send the whole hunks the claim cites, in file order, at most 3 hunks and at most 12 changed lines in all: give their numbers in select_hunks (1 is the first @@ header). If one hunk alone is longer than 12 changed lines, the builder cuts it after a complete pair of removed and added lines.\n4. Never send a changed line without its counterpart: each removed line comes with the line that replaced it, next to it, as a patch lists them. If you write hunks yourself, keep that order and keep the indentation.\n5. When the pickup lists diff_lines_v1 in server_capabilities, a hunk may also carry up to 2 unchanged lines (op context) before and after it, and old_no and new_no (1-based) on every line. The builder adds them from the patch headers when you pass run_id. Never invent a number: if you do not have the real numbers, leave all of them out. Without diff_lines_v1 the builder sends only changed lines and no numbers, and says so in notes.\n6. Set path, ref (the commit sha) and repo.\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 1, \"deletions\": 1,\n \"hunks\": [ [ { \"op\": \"-\", \"text\": \" position: static;\" }, { \"op\": \"+\", \"text\": \" position: sticky;\" } ] ] }\n\nWith diff_lines_v1 the same change, with the unchanged lines around it and the numbers of the real file:\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 1, \"deletions\": 1,\n \"hunks\": [ [ { \"op\": \"context\", \"text\": \".header {\", \"old_no\": 11, \"new_no\": 11 },\n { \"op\": \"-\", \"text\": \" position: static;\", \"old_no\": 12 }, { \"op\": \"+\", \"text\": \" position: sticky;\", \"new_no\": 12 },\n { \"op\": \"context\", \"text\": \"}\", \"old_no\": 13, \"new_no\": 13 } ] ] }\n\n## Where the figure goes\n\n- A causal step: set it as figure on the step in result_summary.causal_paths. Every type except table and changes is allowed there, at most 16 KB. This needs the diagnosis structure, which the pickup advertises as diagnosis_structure_v1. A Tellagen that does not know a figure type yet drops the figure and says so in the completion warnings (figure_invalid).\n- A timeline event: put it in blocks on tellagen_post_timeline_event or tellagen_update_timeline_event. Any type is allowed, up to 12 per event. An update replaces the whole array, so send every block you want to keep, and [] clears them. Set slot to summary to draw the block above the note, or anchor to the exact heading text it sits under. Not both. Set postmortem to false to keep a block out of the postmortem.\n\nCall tellagen_build_figure with placement step_figure or timeline_block, and use the block it returns as it is.\n\n## Getting the data from other servers\n\n- Grafana or Prometheus: a range query returns time and value pairs. Send them as points. Run the same query on two equal windows for a compare.\n- Loki: a count over time by step is a trend. A count by label over two windows is a compare.\n- Prometheus histograms: the _bucket series summed by le over two equal windows are a histogram. Send them as buckets.\n- GitHub Actions: failed jobs of one run go in checks, failures first. The runs of a branch are a run_history: send the run list as github_runs.\n- GitHub commits and pull requests: the lines that broke or fixed it are a diff. Send the file's patch, and the change's additions and deletions.\n- Kubernetes: restarts or ready counts before and after are a compare, a list of pods is a table.\n\n## If Tellagen rejects a figure\n\nThe builder names the field. For a timeline block the API answers 400 invalid_block with field and details.errors. Fix exactly those fields and send once more. Do not drop a figure to get past an error unless the data in it is not real.\n";
7
+ export declare function registerFigureTools(server: McpServer, client: TellagenClient): void;
7
8
  /** Registered from createServer, next to the other resources. */
8
9
  export declare function registerFigureResource(server: McpServer): void;