echelongraph-mcp 2.6.1 → 2.6.3

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.
package/dist/index.js CHANGED
@@ -15,7 +15,9 @@
15
15
  // relays each radar's answer cut to the fields it can label by what they count, and names
16
16
  // what it left out (readKEVExposure, readExposedDatabases, readLeakedCredentials,
17
17
  // readShadowAI and readMCPServers; #2307, #2313, #2315). content[2] is the envelope below,
18
- // as JSON, less what content[0] and the note already say.
18
+ // as JSON, less what content[0] and the note already say. Past 30,000 characters of JSON,
19
+ // content[0] is that JSON cut to fit and the note ends by saying how (TEXT CUT); the
20
+ // envelope's data is always the answer whole (textBudget.ts, #2783).
19
21
  // - failure (isError: true): the lookup did not complete — unreachable host, non-2xx,
20
22
  // timeout, or a 2xx whose body is not a JSON object — named by tool, cause and base URL,
21
23
  // in content[0]; content[1] is the envelope below, as JSON, less the message's sentences.
@@ -56,6 +58,7 @@ import { isHttpEntrypoint, upstreamHeaders, upstreamUserAgent } from "./runtime.
56
58
  import { registerVendorAdvisoryTools } from "./tools/vendor_advisories.js";
57
59
  import { registerPrompts } from "./prompts.js";
58
60
  import { registerResources } from "./resources.js";
61
+ import { dataText, TEXT_BUDGET_DESCRIPTION } from "./textBudget.js";
59
62
  // The package actually running, read from the package.json that ships beside dist/. The MCP
60
63
  // handshake (serverInfo) and the User-Agent both carry its name and version, so the API's
61
64
  // access log can count adoption per version without a code change per release.
@@ -169,16 +172,20 @@ function retryAfterSeconds(v) {
169
172
  // can fail comes back as a typed Failure so the tool renders it as an error result. A 2xx whose
170
173
  // body is not a JSON object (an SPA shell, an edge challenge page, a literal null) is a failure
171
174
  // too — it is not data. init.headers carries what a caller typed (#1983: X-EG-* headers, never
172
- // the URL); the User-Agent and Accept are this server's and are not overridden.
175
+ // the URL); the User-Agent and Accept are this server's and are not overridden. init.timeoutMs
176
+ // can only shorten the request's timeout below TIMEOUT_MS, never lengthen it: check_sbom passes
177
+ // what is left of its call's budget, so a slow batch cannot carry the call past it (#2756).
173
178
  export async function api(path, init) {
179
+ const limitMs = init?.timeoutMs === undefined ? TIMEOUT_MS : Math.max(0, Math.min(TIMEOUT_MS, Math.floor(init.timeoutMs)));
174
180
  const ctrl = new AbortController();
175
181
  let timedOut = false;
176
182
  const timer = setTimeout(() => {
177
183
  timedOut = true;
178
184
  ctrl.abort();
179
- }, TIMEOUT_MS);
185
+ }, limitMs);
180
186
  const m = init?.method && init.method.toUpperCase() !== "GET" ? { method: init.method.toUpperCase() } : {};
181
- const timeout = () => ({ ok: false, kind: "timeout", path, ...m, detail: `no response within ${TIMEOUT_MS} ms` });
187
+ const own = limitMs === TIMEOUT_MS ? {} : { timeoutMs: limitMs };
188
+ const timeout = () => ({ ok: false, kind: "timeout", path, ...m, ...own, detail: `no response within ${limitMs} ms` });
182
189
  try {
183
190
  let res;
184
191
  try {
@@ -241,7 +248,7 @@ export function describeFailure(f) {
241
248
  case "network":
242
249
  return `EchelonGraph at ${SHOWN_BASE} could not be reached for ${verb} ${f.path}: ${f.detail}.`;
243
250
  case "timeout":
244
- return `EchelonGraph at ${SHOWN_BASE} did not answer ${verb} ${f.path} within ${TIMEOUT_MS} ms.`;
251
+ return `EchelonGraph at ${SHOWN_BASE} did not answer ${verb} ${f.path} within ${f.timeoutMs ?? TIMEOUT_MS} ms.`;
245
252
  case "http":
246
253
  return `EchelonGraph answered HTTP ${f.status} ${where} — the API said: ${f.detail}.`;
247
254
  case "not_json":
@@ -338,12 +345,15 @@ export const checked = (tool, schema, r) => {
338
345
  const p = schema.safeParse(r.structuredContent);
339
346
  return p.success ? r : unexpectedShape(tool, p.error);
340
347
  };
341
- // A success: content[0] is the data, content[1] the note, content[2] the envelope less both;
342
- // the envelope carries both, the note as sentences after any the envelope adds about itself.
343
- export const succeeded = (data, note, env) => {
348
+ // A success: content[0] is the data (cut to DATA_TEXT_BUDGET when it is larger, #2783), content[1]
349
+ // the note, content[2] the envelope less both; the envelope carries both, the note as sentences
350
+ // after any the envelope adds about itself. structuredContent.data is the data whole.
351
+ export const succeeded = (data, note, env, cut) => {
344
352
  const own = env.notes ?? [];
345
- const structuredContent = { ...env, notes: [...own, ...sentences(note)], data };
346
- return { content: [text(JSON.stringify(data, null, 2)), text(note), envelopeText(structuredContent, note, own)], structuredContent };
353
+ const shown = dataText(data, cut);
354
+ const said = shown.said ? `${note} ${shown.said}` : note;
355
+ const structuredContent = { ...env, notes: [...own, ...sentences(said)], data };
356
+ return { content: [text(shown.text), text(said), envelopeText(structuredContent, said, own)], structuredContent };
347
357
  };
348
358
  export const okHead = (tool, status) => `${tool} OK: EchelonGraph answered${status === undefined ? "" : ` HTTP ${status}`} from ${SHOWN_BASE}.`;
349
359
  // Tolerant readers for the note: a missing or renamed field degrades the sentence, never
@@ -378,7 +388,8 @@ export const realInstant = (s) => s !== undefined && Date.parse(s) > 0;
378
388
  // get_cve, and none for a search page, whose rows each carry their own. None of them serves a
379
389
  // fleet-wide time at which the feed's pollers last completed, so freshness is null: the
380
390
  // summary's poller.last_poll_at is the answering instance's own NVD poller (cve/poller.go
381
- // Stats, in memory), and is relayed in data but not presented as the feed's freshness.
391
+ // Stats, in memory), and is relayed in data but not presented as the feed's freshness; the note
392
+ // says what the whole poller block is (summaryPollerNote, #2647).
382
393
  const CVE_FEED_METHOD = "EchelonGraph's CVE Pulse feed: CVE records compiled from NVD, MITRE-CNA pre-NVD records, CISA-KEV, EPSS and GitHub GHSA, each polled from its source on a schedule.";
383
394
  const NO_FEED_FRESHNESS = "freshness is null: the CVE feed's answer carries no time at which its pollers last completed a poll for the feed as a whole.";
384
395
  function scoreStateOf(rec) {
@@ -495,6 +506,29 @@ function summaryRejectedNote(d) {
495
506
  return "";
496
507
  return ` summary.rejected (${rejected}) counts CVE records rejected (withdrawn) by their numbering authority, not active CVEs: report them as withdrawn records, never as vulnerabilities.`;
497
508
  }
509
+ // ── poller, one instance's counters (#2647) ──
510
+ //
511
+ // The summary answer carries a poller block beside summary: cves_ingested, cves_skipped,
512
+ // http_retries, interval, last_poll_at, last_poll_dur_ms, poll_count and poll_errors. They are
513
+ // core-backend cve/poller.go Stats: the in-memory counters of the NVD poller of the ONE API
514
+ // instance that answered, since that instance last started, and every restart zeroes them. So
515
+ // cves_ingested 7195 (production, 2026-09-30T10:02:13Z) is what that instance ingested since it
516
+ // started, not the feed's size or intake, and poll_errors is not the feed's reliability. Through
517
+ // 2.6.1 the tool relayed the block with no word about it. The JSON is still relayed as sent; the
518
+ // outputSchema describes the block, and whenever the answer carries one the note says what it is,
519
+ // with the counters a model would quote, and an answer without it gets no sentence.
520
+ const POLLER_QUOTED = ["cves_ingested", "poll_count", "poll_errors"];
521
+ function summaryPollerNote(d) {
522
+ const poller = field(d, "poller");
523
+ if (!isPlainObject(poller) || Object.keys(poller).length === 0)
524
+ return "";
525
+ const quoted = POLLER_QUOTED.flatMap((k) => {
526
+ const n = numAt(poller, k);
527
+ return n === undefined ? [] : [`poller.${k} ${n}`];
528
+ });
529
+ const counters = quoted.length > 0 ? ` (${quoted.join(", ")})` : "";
530
+ return ` poller is one API instance's NVD poller, counted in that instance's memory since it last started and zeroed on every restart: report its counters${counters} as that instance's, never as the feed's size, intake or reliability, and poller.last_poll_at as that instance's last poll, never as the feed's freshness.`;
531
+ }
498
532
  async function cveSummary() {
499
533
  const tool = "cve_summary";
500
534
  try {
@@ -517,8 +551,9 @@ async function cveSummary() {
517
551
  ],
518
552
  };
519
553
  const total = numAt(r.data, "summary", "total");
520
- // What summary.none (#2610), the NVD histogram and summary.rejected (#2641) count.
521
- const labels = `${summaryNoneNote(r.data)}${summaryNVDNote(r.data)}${summaryRejectedNote(r.data)}`;
554
+ // What summary.none (#2610), the NVD histogram and summary.rejected (#2641) count, and what
555
+ // the poller block is (#2647).
556
+ const labels = `${summaryNoneNote(r.data)}${summaryNVDNote(r.data)}${summaryRejectedNote(r.data)}${summaryPollerNote(r.data)}`;
522
557
  if (total === undefined)
523
558
  return succeeded(r.data, `${head}${labels}`, env);
524
559
  if (total === 0) {
@@ -532,6 +567,24 @@ async function cveSummary() {
532
567
  return crashed(tool, e);
533
568
  }
534
569
  }
570
+ // #2783: a page of production rows is about 6,600 characters a row as pretty JSON (38 fields, the
571
+ // description, cpe_match, references and score_factors among them), so the default page of 20 was
572
+ // 133,300 characters of text. Past DATA_TEXT_BUDGET each row in the first text block keeps the
573
+ // fields the description promises and a few more a triage reads, the description cut to 200
574
+ // characters; then, for a page of 50, the fields the description promises with the description cut
575
+ // to 100. structuredContent.data keeps every field of every row; get_cve returns one record whole.
576
+ const SEARCH_CVES_TEXT = {
577
+ rows: "cves",
578
+ levels: [
579
+ {
580
+ keep: ["cve_id", "description", "severity", "cvss_v3_score", "echelongraph_score", "echelongraph_severity", "echelongraph_risk", "score_assessed", "score_unassessed_reason", "epss_score", "kev_listed", "kev_ransomware", "published", "vuln_status", "patch_available", "exploit_poc_available"],
581
+ clip: 200,
582
+ },
583
+ { keep: ["cve_id", "description", "severity", "cvss_v3_score", "echelongraph_score", "score_assessed", "score_unassessed_reason", "epss_score", "kev_listed", "published"], clip: 100 },
584
+ ],
585
+ whole: "get_cve returns any one of these CVEs' records whole.",
586
+ page: (shown, _rows, d) => `To read the rows left out in the text, call search_cves again with the same arguments and offset ${(numAt(d, "offset") ?? 0) + shown}; a page of ${shown} rows or fewer like these fits the text without leaving rows out.`,
587
+ };
535
588
  async function searchCVEs(a) {
536
589
  const tool = "search_cves";
537
590
  try {
@@ -546,6 +599,8 @@ async function searchCVEs(a) {
546
599
  if (a.sort)
547
600
  q.set("sort", a.sort);
548
601
  q.set("limit", String(a.limit ?? 20));
602
+ if (a.offset)
603
+ q.set("offset", String(a.offset));
549
604
  const r = await api(`/api/v1/public/cves?${q.toString()}`, a.search ? { headers: { "X-EG-Search": encodeURIComponent(a.search) } } : undefined);
550
605
  if (!r.ok)
551
606
  return failed(tool, r);
@@ -585,16 +640,16 @@ async function searchCVEs(a) {
585
640
  const empty = shown === 0 && (offset ?? 0) === 0;
586
641
  return succeeded(r.data, empty
587
642
  ? `${head} The query returned 0 CVEs — a measured empty result: EchelonGraph was queried successfully and nothing matched these filters (we looked and found nothing). This is not a lookup failure.${tail}`
588
- : `${head} The API did not count the matches (total_counted is false), so its total is not a count${shown === undefined ? "" : `; ${shown} returned in this page`}.${tail}`, env);
643
+ : `${head} The API did not count the matches (total_counted is false), so its total is not a count${shown === undefined ? "" : `; ${shown} returned in this page`}.${tail}`, env, SEARCH_CVES_TEXT);
589
644
  }
590
645
  const total = numAt(r.data, "total") ?? shown;
591
646
  if (total === undefined)
592
- return succeeded(r.data, `${head}${tail}`, env);
647
+ return succeeded(r.data, `${head}${tail}`, env, SEARCH_CVES_TEXT);
593
648
  if (total === 0 && floor !== true) {
594
- return succeeded(r.data, `${head} The query matched 0 CVEs — a measured empty result: EchelonGraph was queried successfully and nothing matched these filters (we looked and found nothing). This is not a lookup failure.${tail}`, env);
649
+ return succeeded(r.data, `${head} The query matched 0 CVEs — a measured empty result: EchelonGraph was queried successfully and nothing matched these filters (we looked and found nothing). This is not a lookup failure.${tail}`, env, SEARCH_CVES_TEXT);
595
650
  }
596
651
  const matched = floor === true ? `at least ${total} CVEs (total_is_lower_bound is true: the count stopped at that floor)` : `${total} CVEs`;
597
- return succeeded(r.data, `${head} The query matched ${matched}${shown === undefined ? "" : `; ${shown} returned in this page`}.${tail}`, env);
652
+ return succeeded(r.data, `${head} The query matched ${matched}${shown === undefined ? "" : `; ${shown} returned in this page`}.${tail}`, env, SEARCH_CVES_TEXT);
598
653
  }
599
654
  catch (e) {
600
655
  return crashed(tool, e);
@@ -857,6 +912,7 @@ const SHADOW_AI_STATS = new Set([
857
912
  "total",
858
913
  "by_category",
859
914
  "visible_by_category",
915
+ "confirmed_window",
860
916
  "last_observation",
861
917
  "last_24h_count",
862
918
  "last_24h_visible_count",
@@ -947,6 +1003,34 @@ function leftOut(radar, unknown, unusable) {
947
1003
  out.push(`Left out of ${radar} because they were not in the expected shape: ${unusable.join(", ")}.`);
948
1004
  return out;
949
1005
  }
1006
+ function readWindow(v) {
1007
+ if (v === undefined || v === null)
1008
+ return { bad: false };
1009
+ if (!isPlainObject(v))
1010
+ return { bad: true };
1011
+ const from = strAt(v, "from");
1012
+ const to = strAt(v, "to");
1013
+ const undated = v.undated;
1014
+ if (!isCount(undated) || undated < 0 || !Number.isInteger(undated))
1015
+ return { bad: true };
1016
+ if (undated > 0)
1017
+ return { undated, bad: false };
1018
+ if (v.from === null && v.to === null)
1019
+ return { bad: false }; // nothing counted, so nothing dated
1020
+ if (!realInstant(from) || !realInstant(to) || Date.parse(from) > Date.parse(to))
1021
+ return { bad: true };
1022
+ return { window: { from, to }, bad: false };
1023
+ }
1024
+ // The sentence for a radar's window, or for the rows it leaves undated.
1025
+ function windowSentences(prefix, w, what) {
1026
+ if (w.window) {
1027
+ return [`${prefix}.window.from (${w.window.from}) and ${prefix}.window.to (${w.window.to}) are timestamps, not counts: ${what}. They span observations made at different times, not one observation time.`];
1028
+ }
1029
+ if (w.undated !== undefined) {
1030
+ return [`${prefix} carries no window: ${w.undated} of the rows it counts have no observation time on record, so a window over the rest would not describe them.`];
1031
+ }
1032
+ return [];
1033
+ }
950
1034
  function readRadar(body, spec) {
951
1035
  const src = isPlainObject(body) ? body : {};
952
1036
  const data = {};
@@ -976,9 +1060,18 @@ function readRadar(body, spec) {
976
1060
  else if (present(k) && typeof src[k] !== "string")
977
1061
  unusable.push(k);
978
1062
  }
979
- const known = new Set([...spec.counts, ...Object.keys(spec.rows), ...spec.instants]);
1063
+ let undated;
1064
+ if (spec.window) {
1065
+ const w = readWindow(src[spec.window]);
1066
+ if (w.window)
1067
+ data.window = w.window;
1068
+ else if (w.bad)
1069
+ unusable.push(spec.window);
1070
+ undated = w.undated;
1071
+ }
1072
+ const known = new Set([...spec.counts, ...Object.keys(spec.rows), ...spec.instants, ...(spec.window ? [spec.window] : [])]);
980
1073
  unknown.unshift(...Object.keys(src).filter((k) => !known.has(k)));
981
- return { data, unknown, unusable };
1074
+ return { data, unknown, unusable, undated };
982
1075
  }
983
1076
  // ── last_run_at: when a radar last COMPLETED a check (#2335) ──
984
1077
  //
@@ -1176,9 +1269,10 @@ const EXPOSED_DB_SPEC = {
1176
1269
  top_countries: { required: { country: "string", hosts: "number" } },
1177
1270
  },
1178
1271
  instants: ["generated_at", "last_run_at"],
1272
+ window: "observed_window",
1179
1273
  };
1180
1274
  function readExposedDatabases(body) {
1181
- const { data, unknown, unusable } = readRadar(body, EXPOSED_DB_SPEC);
1275
+ const { data, unknown, unusable, undated } = readRadar(body, EXPOSED_DB_SPEC);
1182
1276
  const sentences = [];
1183
1277
  const n = (k) => numIn(data, k);
1184
1278
  const totals = [
@@ -1201,6 +1295,7 @@ function readExposedDatabases(body) {
1201
1295
  if (gated.length) {
1202
1296
  sentences.push(`${gated.join("; ")}. The names are index, database, table or field names in the Shodan or LeakIX banner or in the check's response, never record values, and the gate passes one unambiguous term (such as ssn or cardholder) or two distinct indicators. It is precision-first: a service whose names do not pass it is not counted, whatever it holds, so the other services are not shown to hold no personal or card data.`);
1203
1297
  }
1298
+ sentences.push(...windowSentences("exposed_databases", { window: data.window, undated, bad: false }, "when EchelonGraph's check last confirmed the oldest and the newest of the services counted answering without authentication"));
1204
1299
  sentences.push(...lastCheck("exposed_databases", data));
1205
1300
  sentences.push(...leftOut("exposed_databases", unknown, unusable));
1206
1301
  return { data, sentences };
@@ -1224,9 +1319,10 @@ const LEAKED_CREDS_SPEC = {
1224
1319
  top_types: { required: { secret_type: "string", count: "number" } },
1225
1320
  },
1226
1321
  instants: ["generated_at", "last_run_at"],
1322
+ window: "observed_window",
1227
1323
  };
1228
1324
  function readLeakedCredentials(body) {
1229
- const { data, unknown, unusable } = readRadar(body, LEAKED_CREDS_SPEC);
1325
+ const { data, unknown, unusable, undated } = readRadar(body, LEAKED_CREDS_SPEC);
1230
1326
  const sentences = [];
1231
1327
  const n = (k) => numIn(data, k);
1232
1328
  const totals = [
@@ -1246,6 +1342,7 @@ function readLeakedCredentials(body) {
1246
1342
  if (totals.length || rankings.length) {
1247
1343
  sentences.push("None of these is validated: each is a credential-shaped string in a public commit that passed EchelonGraph's filters, at most structurally checked (a checksum or format decode) and never tested against its provider, so none of them is a count of working credentials.");
1248
1344
  }
1345
+ sentences.push(...windowSentences("leaked_credentials", { window: data.window, undated, bad: false }, "when EchelonGraph's detector last found the oldest and the newest of the (repository, secret) pairs counted in a public commit"));
1249
1346
  sentences.push(...lastCheck("leaked_credentials", data));
1250
1347
  sentences.push(...leftOut("leaked_credentials", unknown, unusable));
1251
1348
  return { data, sentences };
@@ -1270,6 +1367,13 @@ function readShadowAI(sa) {
1270
1367
  const last24Visible = take("last_24h_visible_count", numAt(stats, "last_24h_visible_count"));
1271
1368
  if (last24Visible !== undefined)
1272
1369
  confirmed.last_24h = last24Visible;
1370
+ // When the confirmed rows were observed (#2438): the verifier's deciding probe times, over the
1371
+ // rows visible_by_category counts. Relayed only beside the count it dates.
1372
+ const confirmedWindow = readWindow(field(stats, "confirmed_window"));
1373
+ if (!confirmedWindow.bad && field(stats, "confirmed_window") !== undefined)
1374
+ used.add("confirmed_window");
1375
+ if (confirmedWindow.window && confirmed.total !== undefined)
1376
+ confirmed.window = confirmedWindow.window;
1273
1377
  // Observed: every row of shadow_ct_observations, whatever its liveness.
1274
1378
  const observed = {};
1275
1379
  const total = take("total", numAt(stats, "total"));
@@ -1305,6 +1409,9 @@ function readShadowAI(sa) {
1305
1409
  sentences.push(confirmed.total === undefined
1306
1410
  ? `Shadow AI: the answer carries no usable stats.visible_by_category, so it does not say how many services are confirmed exposed${last24Visible === undefined ? "" : `; confirmed_exposed.last_24h (${last24Visible}) counts confirmed-exposed services first recorded in the last 24 h`}.`
1307
1411
  : `Shadow AI confirmed exposed: ${confirmed.total} (confirmed_exposed.total, the sum of confirmed_exposed.by_category: services EchelonGraph's probes found answering without an authentication gate, with liveness active or, during a re-check, rechecking)${last24Visible === undefined ? "" : `, ${last24Visible} of them first recorded in the last 24 h (confirmed_exposed.last_24h)`}. Of the shadow_ai numbers, only confirmed_exposed counts exposed services.`);
1412
+ if (confirmed.total !== undefined) {
1413
+ sentences.push(...windowSentences("shadow_ai.confirmed_exposed", { window: confirmedWindow.window, undated: confirmedWindow.undated, bad: false }, "when EchelonGraph's verifier ran the probe that last decided the oldest and the newest of the services confirmed_exposed counts"));
1414
+ }
1308
1415
  if (total !== undefined) {
1309
1416
  sentences.push(`Shadow AI observed: ${total} (observed.total) counts every Certificate Transparency or Shodan observation on record, whatever its verification state: that many observed, not that many exposed.`);
1310
1417
  }
@@ -1596,9 +1703,9 @@ function readMCPServers(src) {
1596
1703
  }
1597
1704
  const EXPOSURE_RADAR_DESCRIPTION = `Aggregate totals from EchelonGraph's internet-exposure radars, each refreshed on its own schedule: internet-facing services running actively-exploited (CISA-KEV) CVEs, plus the ransomware-linked subset, derived from Shodan data; unauthenticated data stores and observability UIs, found through Shodan (LeakIX when Shodan query credits run low) and then confirmed by EchelonGraph's own identified check (not a pure read: on Redis it names its client, and on ClickHouse its query is recorded in the server's query log); leaked credentials sampled from public GitHub push events; and shadow AI services found through Certificate Transparency logs and Shodan and then checked by EchelonGraph's identified probes. It also gives MCP-server counts: hostnames named like an MCP server in EchelonGraph's own Certificate Transparency feed (no Shodan data), each counted once by its latest verdict from EchelonGraph's identified MCP probe, which never sends tools/call. Every number in the result is labelled here and in the result's note by what it counts; a field this version cannot label is left out and named in the note. ` +
1598
1705
  `kev_exposure: kev_exposure.distinct_hosts counts distinct ip:port services, not machines (a machine answering on two ports counts twice), with at least one CISA-KEV-listed CVE on record, and kev_exposure.ransomware_hosts those with a ransomware-linked one; kev_exposure.kev_cves_exposed and kev_exposure.ransomware_cves count distinct CVEs with at least one such service; kev_exposure.correlations counts service×CVE pairs, not services, so a service with three KEV CVEs counts three times. kev_exposure.top_products, kev_exposure.top_countries and kev_exposure.top_cves rank up to 12 products, 10 countries and 12 CVEs by those services; kev_exposure.top_cves[].cvss_v3_score and kev_exposure.top_cves[].epss_score are the highest CVSS v3 base score and EPSS probability recorded on that CVE's observations. kev_exposure.trend counts service×CVE pairs still on record by the week in which each was first recorded, over 12 weeks, so earlier weeks read low. kev_exposure.newest_kev lists the 15 CVEs that EchelonGraph's CVE records most recently mark as CISA-KEV-listed, each with an exposure_state: exposed, where kev_exposure.newest_kev[].exposed_hosts counts distinct ip:port services on record with it; or not_assessed, where the API's answer holds no measurement for that CVE (its 0 is not one) and no count is relayed, and cve_exposure says per CVE whether the radar tracks it. kev_exposure.newest_kev[].cvss_v3_score and kev_exposure.newest_kev[].epss_score are the CVE record's CVSS v3 base score and EPSS probability. ` +
1599
- `exposed_databases: exposed_databases.distinct_hosts counts distinct ip:port services the check confirmed answering without authentication, and exposed_databases.engines the distinct engine types among them; exposed_databases.top_engines and exposed_databases.top_countries rank up to 15 engines and 10 countries by those services. exposed_databases.pii_likely and exposed_databases.pci_likely count services whose schema names (never record values) pass a high-confidence, precision-first gate for personal or payment-card data, so a service outside them is not shown to hold no such data. ` +
1600
- `leaked_credentials: leaked_credentials.total counts (repository, secret) pairs, not distinct secrets, so one secret in three repositories counts three times; leaked_credentials.distinct_secrets counts each secret once and leaked_credentials.distinct_repos counts repositories; leaked_credentials.top_providers and leaked_credentials.top_types rank up to 15 providers and secret types by those pairs. None is validated: each is a credential-shaped string that passed EchelonGraph's filters, at most structurally checked and never tested against its provider. Each of those three radars also carries generated_at, when the API computed its totals, and, when the API can tell, last_run_at. kev_exposure.last_run_at, exposed_databases.last_run_at and leaked_credentials.last_run_at are timestamps, not counts: each is when that radar last completed a check, a cycle whose reads succeeded, among them a Shodan search (for exposed_databases, or its LeakIX fallback) that answered at least one query, or for leaked_credentials a read of the public GitHub event stream. A cycle that read nothing does not move it, and it is not the time of every record a radar's numbers count, which cover everything still on record, not only what the last check found. A radar whose answer carries no last_run_at has none in the result, and the note says nothing about it. ` +
1601
- `shadow_ai: the result is regrouped by what each number counts. shadow_ai.confirmed_exposed counts services EchelonGraph's probes found answering without an authentication gate (liveness active, or rechecking during a re-check): confirmed_exposed.total is the sum of confirmed_exposed.by_category, and confirmed_exposed.last_24h counts those first recorded in the last 24 h. Of the shadow_ai numbers, only confirmed_exposed counts exposed services. shadow_ai.observed counts every Certificate Transparency or Shodan observation on record, whatever its verification state: its numbers are observed, not exposed. They are observed.total; observed.by_category (the same observations by category); observed.last_24h (those first recorded in the last 24 h); observed.trend_30d (observations per UTC day over the last 30 days); and observed.top_products, observed.top_countries and observed.top_issuers (up to ten products, countries and issuers ranked by observations, where an issuer is the certificate's CA for a Certificate Transparency observation and the hosting operator Shodan reports for a Shodan one). shadow_ai.authentication counts observations by probe outcome: authentication.observed where a probe observed an authentication gate (a 401/403, a login page or an auth marker), and authentication.not_determined where the service answered but no probe could tell. Neither authentication count is part of confirmed_exposed, and observed.total minus confirmed_exposed.total is not a count of secured services. The shadow-AI poller block carries only running and last_run_at: last_run_at is when the radar's leader last completed a Certificate Transparency (crt.sh) cycle, and its running is true only when that was within ${SHADOW_AI_SILENT_AFTER} of the answer. ` +
1706
+ `exposed_databases: exposed_databases.distinct_hosts counts distinct ip:port services the check confirmed answering without authentication, and exposed_databases.engines the distinct engine types among them; exposed_databases.top_engines and exposed_databases.top_countries rank up to 15 engines and 10 countries by those services. exposed_databases.pii_likely and exposed_databases.pci_likely count services whose schema names (never record values) pass a high-confidence, precision-first gate for personal or payment-card data, so a service outside them is not shown to hold no such data. exposed_databases.window.from and exposed_databases.window.to are timestamps, not counts: when EchelonGraph's check last confirmed the oldest and the newest of the services counted, a span of checks made at different times; with a counted service that has no such time on record there is no window. ` +
1707
+ `leaked_credentials: leaked_credentials.total counts (repository, secret) pairs, not distinct secrets, so one secret in three repositories counts three times; leaked_credentials.distinct_secrets counts each secret once and leaked_credentials.distinct_repos counts repositories; leaked_credentials.top_providers and leaked_credentials.top_types rank up to 15 providers and secret types by those pairs. None is validated: each is a credential-shaped string that passed EchelonGraph's filters, at most structurally checked and never tested against its provider. leaked_credentials.window.from and leaked_credentials.window.to are timestamps, not counts: when EchelonGraph's detector last found the oldest and the newest of the pairs counted. Each of those three radars also carries generated_at, when the API computed its totals, and, when the API can tell, last_run_at. kev_exposure.last_run_at, exposed_databases.last_run_at and leaked_credentials.last_run_at are timestamps, not counts: each is when that radar last completed a check, a cycle whose reads succeeded, among them a Shodan search (for exposed_databases, or its LeakIX fallback) that answered at least one query, or for leaked_credentials a read of the public GitHub event stream. A cycle that read nothing does not move it, and it is not the time of every record a radar's numbers count, which cover everything still on record, not only what the last check found. A radar whose answer carries no last_run_at has none in the result, and the note says nothing about it. ` +
1708
+ `shadow_ai: the result is regrouped by what each number counts. shadow_ai.confirmed_exposed counts services EchelonGraph's probes found answering without an authentication gate (liveness active, or rechecking during a re-check): confirmed_exposed.total is the sum of confirmed_exposed.by_category, and confirmed_exposed.last_24h counts those first recorded in the last 24 h. Of the shadow_ai numbers, only confirmed_exposed counts exposed services. confirmed_exposed.window.from and confirmed_exposed.window.to are timestamps, not counts: when EchelonGraph's verifier ran the probe that last decided the oldest and the newest of those services, a span of probes made at different times. shadow_ai.observed counts every Certificate Transparency or Shodan observation on record, whatever its verification state: its numbers are observed, not exposed. They are observed.total; observed.by_category (the same observations by category); observed.last_24h (those first recorded in the last 24 h); observed.trend_30d (observations per UTC day over the last 30 days); and observed.top_products, observed.top_countries and observed.top_issuers (up to ten products, countries and issuers ranked by observations, where an issuer is the certificate's CA for a Certificate Transparency observation and the hosting operator Shodan reports for a Shodan one). shadow_ai.authentication counts observations by probe outcome: authentication.observed where a probe observed an authentication gate (a 401/403, a login page or an auth marker), and authentication.not_determined where the service answered but no probe could tell. Neither authentication count is part of confirmed_exposed, and observed.total minus confirmed_exposed.total is not a count of secured services. The shadow-AI poller block carries only running and last_run_at: last_run_at is when the radar's leader last completed a Certificate Transparency (crt.sh) cycle, and its running is true only when that was within ${SHADOW_AI_SILENT_AFTER} of the answer. ` +
1602
1709
  `mcp_servers: counts and timestamps only, no hostname. mcp_servers.total counts hostnames the AI-exposure radar has checked for an MCP server, each once by its latest verdict on record, and not every one is an MCP server; EchelonGraph's own control servers are left out, and mcp_servers.own_controls_excluded counts them. mcp_servers.total is mcp_servers.protected plus mcp_servers.pending_readjudication plus mcp_servers.not_assessed. mcp_servers.protected counts hostnames whose /mcp endpoint asked for credentials and whose OAuth protected-resource metadata validated under RFC 9728; mcp_servers.prm_via divides them by where that document was found: mcp_servers.prm_via.header, mcp_servers.prm_via.wellknown_path and mcp_servers.prm_via.wellknown_root. mcp_servers.pending_readjudication counts verdicts of a rule since replaced, not yet re-checked. mcp_servers.not_assessed counts the rest, whose protection the radar could not assess (not assessed does not mean unprotected), and mcp_servers.not_assessed_by_reason puts each in one bucket. mcp_servers.not_assessed_by_reason.identified_no_challenge holds servers that identified themselves as MCP servers and did not ask for credentials at the handshake. That is normal in MCP: authorization is optional in the spec, and a server can enforce it at tools/call instead, which EchelonGraph never sends, so this bucket is not a finding of exposure. ${MCP_CHALLENGE_REASON_FIELDS} hold endpoints that asked for credentials but whose RFC 9728 metadata did not validate, by why, so none of them is shown to lack protection; mcp_servers.not_assessed_by_reason.challenge_unadjudicated holds endpoints that asked for credentials before that check existed, not yet re-checked. mcp_servers.not_assessed_by_reason.no_http_answer holds hostnames that gave no HTTP answer, and mcp_servers.not_assessed_by_reason.not_identified_as_mcp hostnames whose HTTP answer identified no MCP server. mcp_servers.era divides every counted hostname by protocol era: mcp_servers.era.legacy; mcp_servers.era.dual, a lower bound; mcp_servers.era.modern, not proven modern-only; mcp_servers.era.unknown; and mcp_servers.era.not_measured, recorded before the era probe and not re-checked since. mcp_servers.transport divides them by transport: mcp_servers.transport.streamable_http, mcp_servers.transport.legacy_sse, mcp_servers.transport.unknown and mcp_servers.transport.not_measured. mcp_servers.window.from and mcp_servers.window.to are when the oldest and the newest of the verdicts counted were last checked. mcp_servers.last_run_at is a timestamp, not a count: when the AI-exposure radar, which checks other AI services too, last completed a check; mcp_servers.enabled is whether one completed within ${MCP_ENABLED_WITHIN} of the answer, and mcp_servers.counted_at is when the API read the counts. A partition whose buckets do not add up to the count it divides is left out and named; an answer that does not say it is the MCP-server counts, or whose mcp_servers.total, mcp_servers.protected, mcp_servers.pending_readjudication and mcp_servers.not_assessed are missing or contradict each other, is a failure. ${SHODAN_OWNERSHIP}`;
1603
1710
  // exposure_radar's envelope. Every radar answered, but no stats answer says when the services
1604
1711
  // or records it counts were observed: each count covers everything that radar still holds on
@@ -1621,7 +1728,7 @@ const EXPOSURE_RADAR_DESCRIPTION = `Aggregate totals from EchelonGraph's interne
1621
1728
  // and the envelope's own note names it.
1622
1729
  const RADAR_METHOD = "Aggregate counts over what each radar holds on record: kev_exposure, Shodan banners whose version maps to a CISA-KEV-listed CVE; exposed_databases, services found through Shodan (LeakIX when Shodan query credits run low) and confirmed by EchelonGraph's own identified check; leaked_credentials, credential-shaped strings in public GitHub push events; shadow_ai, services found through Certificate Transparency logs and Shodan and checked by EchelonGraph's identified probes; mcp_servers, the latest verdict on record per hostname named like an MCP server in EchelonGraph's own Certificate Transparency feed, from EchelonGraph's identified MCP probe (server/discover, and initialize only if that is refused; never tools/call), where protected means the endpoint's RFC 9728 protected-resource metadata validated.";
1623
1730
  const RADAR_NAMES = RADARS.map(([name]) => name);
1624
- const RADAR_STATE_NOTE = "state is not_assessed: every radar answered, but none gives one time at which what it counts was observed: kev_exposure, exposed_databases, leaked_credentials and shadow_ai give none, and mcp_servers dates its verdicts at most by a window (mcp_servers.window), from the oldest check among them to the newest, so no count here is presented as a dated measurement and measured_at is null. Each count is what that radar holds on record, and the note labels each one by what it counts.";
1731
+ const RADAR_STATE_NOTE = "state is not_assessed: every radar answered, but none gives one time at which what it counts was observed: kev_exposure gives none, and exposed_databases, leaked_credentials, shadow_ai's confirmed_exposed and mcp_servers date what they count at most by a window (exposed_databases.window, leaked_credentials.window, shadow_ai.confirmed_exposed.window, mcp_servers.window), from the oldest observation among the rows counted to the newest, so no count here is presented as a dated measurement and measured_at is null. Each count is what that radar holds on record, and the note labels each one by what it counts.";
1625
1732
  const RADAR_FRESHNESS_NOTE = "freshness gives each radar's last completed check where the API serves one (freshness.kev_exposure.last_run_at, freshness.exposed_databases.last_run_at, freshness.leaked_credentials.last_run_at, freshness.shadow_ai.last_run_at with freshness.shadow_ai.running, and freshness.mcp_servers.last_run_at with freshness.mcp_servers.enabled), and null where it does not.";
1626
1733
  async function exposureRadar() {
1627
1734
  const tool = "exposure_radar";
@@ -1773,6 +1880,10 @@ const CVERecord = z.looseObject({
1773
1880
  modified: opt(z.string()),
1774
1881
  updated_at: opt(z.string()),
1775
1882
  });
1883
+ // #2647: what cve_summary says the poller block is (summaryPollerNote). Like the #2641 strings
1884
+ // beside SUMMARY_NONE_DESCRIPTION, it uses none of #2610's six words ("any", "not", "rating",
1885
+ // "scored", "source", "yet"). Declared here, before the outputSchema that describes poller with it.
1886
+ const SUMMARY_POLLER_DESCRIPTION = "poller holds the in-memory counters of the NVD poller of the one API instance that answered (cves_ingested, cves_skipped, http_retries, poll_count, poll_errors, last_poll_at, last_poll_dur_ms, interval), counted since that instance last started and zeroed on every restart: they describe that instance, never the feed's size, intake, reliability or freshness. Whenever the answer carries poller the note says so.";
1776
1887
  // One of the NVD histogram's four labelled buckets (#2641).
1777
1888
  const nvdBand = (label) => opt(z.number()).describe(`Of the active CVEs total counts, those whose NVD CVSS severity label is ${label}: NVD's label, as provenance, never EchelonGraph's severity band.`);
1778
1889
  const CVE_SUMMARY_OUTPUT = envelopeSchema({
@@ -1798,6 +1909,21 @@ const CVE_SUMMARY_OUTPUT = envelopeSchema({
1798
1909
  last_updated: opt(z.string()),
1799
1910
  })
1800
1911
  .optional(),
1912
+ // #2647: one instance's counters, never the feed's (see summaryPollerNote).
1913
+ poller: z
1914
+ .looseObject({
1915
+ cves_ingested: opt(z.number()).describe("CVE records this instance's NVD poller wrote since the instance last started: never the feed's size or intake."),
1916
+ cves_skipped: opt(z.number()).describe("CVE records this instance's NVD poller skipped since the instance last started."),
1917
+ http_retries: opt(z.number()).describe("HTTP retries this instance's NVD poller made since the instance last started."),
1918
+ interval: opt(z.string()).describe("How often this instance's NVD poller polls."),
1919
+ last_poll_at: opt(z.string()).describe("When this instance's NVD poller last polled: never the feed's freshness."),
1920
+ last_poll_dur_ms: opt(z.number()).describe("How long that poll took, in milliseconds."),
1921
+ poll_count: opt(z.number()).describe("Polls this instance's NVD poller made since the instance last started."),
1922
+ poll_errors: opt(z.number()).describe("Polls of this instance's NVD poller that failed since the instance last started: never the feed's reliability."),
1923
+ })
1924
+ .nullable()
1925
+ .optional()
1926
+ .describe(SUMMARY_POLLER_DESCRIPTION),
1801
1927
  }),
1802
1928
  coverage: null,
1803
1929
  freshness: null,
@@ -1858,10 +1984,13 @@ const zRow = (spec) => z.strictObject({
1858
1984
  ...Object.fromEntries(Object.entries(spec.required).map(([k, kind]) => [k, zKind(kind)])),
1859
1985
  ...Object.fromEntries(Object.entries(spec.optional ?? {}).map(([k, kind]) => [k, zKind(kind).optional()])),
1860
1986
  });
1987
+ // A relayed observation window (#2438): two instants, never a count.
1988
+ const Window = z.strictObject({ from: Instant, to: Instant });
1861
1989
  const zRadar = (spec, rows = {}) => z.strictObject({
1862
1990
  ...Object.fromEntries(spec.counts.map((k) => [k, z.number().optional()])),
1863
1991
  ...Object.fromEntries(Object.entries(spec.rows).map(([k, rs]) => [k, (rows[k] ?? z.array(zRow(rs))).optional()])),
1864
1992
  ...Object.fromEntries(spec.instants.map((k) => [k, Instant.optional()])),
1993
+ ...(spec.window ? { window: Window.optional() } : {}),
1865
1994
  });
1866
1995
  // A newest_kev row as newestKEVRow relays it: `tracked` is read, not relayed, and a count only
1867
1996
  // when the row's exposure_state is not not_assessed.
@@ -1875,7 +2004,9 @@ const NewestKEVRow = z.strictObject({
1875
2004
  const CountMap = z.record(z.string(), z.number());
1876
2005
  const countRowsOf = (label) => z.array(z.strictObject({ [label]: z.string(), count: z.number() }));
1877
2006
  const ShadowAIData = z.strictObject({
1878
- confirmed_exposed: z.strictObject({ total: z.number().optional(), by_category: CountMap.optional(), last_24h: z.number().optional() }).optional(),
2007
+ confirmed_exposed: z
2008
+ .strictObject({ total: z.number().optional(), by_category: CountMap.optional(), last_24h: z.number().optional(), window: Window.optional() })
2009
+ .optional(),
1879
2010
  observed: z
1880
2011
  .strictObject({
1881
2012
  total: z.number().optional(),
@@ -1942,6 +2073,7 @@ const INSTRUCTIONS = [
1942
2073
  "Everything these tools return is public: EchelonGraph's CVE Pulse feed, and aggregate, host-redacted totals from its exposure radars.",
1943
2074
  "Every result says how it was measured: state, measured_at, method, coverage, freshness and notes, in its structuredContent and again in its text.",
1944
2075
  "Its last text block is that structuredContent as JSON, less what an earlier text block already gives verbatim: data, which is a success's first text block; the sentences of the text block just before it (the note, or a failure's message), with which structuredContent's notes end; and method, where that block quotes it.",
2076
+ "Past 30,000 characters of JSON, that first text block holds data cut to fit, and the note says what the cut leaves out and where to read it (TEXT CUT); structuredContent's data always holds it whole.",
1945
2077
  "state is measured, not_assessed, failed or invalid_input.",
1946
2078
  "not_assessed means the answer holds no dated measurement of what was asked, so no count in it is presented as one.",
1947
2079
  "It can still relay a count, as what the source holds on record, undated, and its notes say what each count is: cve_exposure's exposed_hosts when its exposure_state is exposed, and exposure_radar's labelled totals, are such counts.",
@@ -1982,40 +2114,42 @@ export function createServer() {
1982
2114
  const server = new McpServer({ name: NAME, version: VERSION }, { instructions: INSTRUCTIONS, capabilities: { tools: { listChanged: false }, prompts: { listChanged: false }, resources: { listChanged: false } } });
1983
2115
  server.registerTool("cve_summary", {
1984
2116
  title: "CVE feed summary",
1985
- description: `Summary of EchelonGraph's CVE Pulse feed: summary.total active CVEs, their counts by severity band (summary.critical, summary.high, summary.medium, summary.low), the count with no band (summary.none), and summary.last_updated, the newest modification time among those records. ${SUMMARY_NONE_DESCRIPTION} ${SUMMARY_NVD_DESCRIPTION} ${SUMMARY_REJECTED_DESCRIPTION} The feed is polled from its sources on a schedule, so this is the state as of that update. ${FEED_ENVELOPE}`,
2117
+ description: `Summary of EchelonGraph's CVE Pulse feed: summary.total active CVEs, their counts by severity band (summary.critical, summary.high, summary.medium, summary.low), the count with no band (summary.none), and summary.last_updated, the newest modification time among those records. ${SUMMARY_NONE_DESCRIPTION} ${SUMMARY_NVD_DESCRIPTION} ${SUMMARY_REJECTED_DESCRIPTION} ${SUMMARY_POLLER_DESCRIPTION} The feed is polled from its sources on a schedule, so this is the state as of that update. ${FEED_ENVELOPE} ${TEXT_BUDGET_DESCRIPTION}`,
1986
2118
  outputSchema: CVE_SUMMARY_OUTPUT,
1987
2119
  annotations: ANNOTATIONS,
1988
2120
  }, async () => checked("cve_summary", CVE_SUMMARY_OUTPUT, await cveSummary()));
1989
2121
  server.registerTool("search_cves", {
1990
2122
  title: "Search CVEs",
1991
- description: `Search/list CVEs from EchelonGraph's CVE feed (NVD + MITRE-CNA pre-NVD + CISA-KEV + EPSS + GitHub GHSA, each polled on a schedule). Filter by severity, minimum CVSS, free text, and sort. Returns cves, each with cve_id, severity, cvss_v3_score, echelongraph_score and score_assessed (whether EchelonGraph has scored it), epss_score and kev_listed where the record has them, and the list's total, total_counted (false: the matches were not counted, so total is not a count), total_is_lower_bound (true: at least total), search_relaxed (true: a phrase was relaxed to all of its words), limit and offset. ${SCORE_ASSESSED_DESCRIPTION} ${FEED_ENVELOPE} coverage repeats total, total_counted, total_is_lower_bound, search_relaxed, limit and offset, and gives returned, the rows in this page.`,
2123
+ description: `Search/list CVEs from EchelonGraph's CVE feed (NVD + MITRE-CNA pre-NVD + CISA-KEV + EPSS + GitHub GHSA, each polled on a schedule). Filter by severity, minimum CVSS, free text, and sort; page with limit and offset. Returns cves, each with cve_id, severity, cvss_v3_score, echelongraph_score and score_assessed (whether EchelonGraph has scored it), epss_score and kev_listed where the record has them, and the list's total, total_counted (false: the matches were not counted, so total is not a count), total_is_lower_bound (true: at least total), search_relaxed (true: a phrase was relaxed to all of its words), limit and offset. ${SCORE_ASSESSED_DESCRIPTION} ${FEED_ENVELOPE} coverage repeats total, total_counted, total_is_lower_bound, search_relaxed, limit and offset, and gives returned, the rows in this page. ${TEXT_BUDGET_DESCRIPTION} Cut, each row keeps at least the fields named above and the first 200 characters of its description (100 on a page too long for that), or rows are left out and the note gives the offset to call next.`,
1992
2124
  inputSchema: z.object({
1993
2125
  search: z.string().optional().describe("free-text search (product, vendor, or keyword, e.g. 'tomcat')"),
1994
2126
  severity: z.enum(["CRITICAL", "HIGH", "MEDIUM", "LOW"]).optional().describe("filter to one severity"),
1995
2127
  min_cvss: z.number().min(0).max(10).optional().describe("minimum CVSS score"),
1996
2128
  sort: z.enum(["published", "modified", "nvd", "echelongraph", "epss"]).optional().describe("sort order (default: published)"),
1997
2129
  limit: z.number().int().min(1).max(50).optional().describe("page size (default 20, max 50)"),
2130
+ // #2783: the next page, which the note names when the text leaves rows out.
2131
+ offset: z.number().int().min(0).max(10000).optional().describe("rows to skip (default 0)"),
1998
2132
  }),
1999
2133
  outputSchema: SEARCH_CVES_OUTPUT,
2000
2134
  annotations: ANNOTATIONS,
2001
2135
  }, async (a) => checked("search_cves", SEARCH_CVES_OUTPUT, await searchCVEs(a)));
2002
2136
  server.registerTool("get_cve", {
2003
2137
  title: "CVE detail",
2004
- description: `Full record for one CVE: description, severity, cvss_v3_score, cvss_v4_score and cvss_v4_severity (when the record has a CVSS v4 score), echelongraph_score and echelongraph_severity with score_confidence (EchelonGraph's multi-source score) and score_assessed (whether EchelonGraph has scored it), epss_score and epss_percentile, CISA-KEV status (kev_listed, kev_added_date, and kev_ransomware for known ransomware-campaign use), ghsa_id (GitHub GHSA), references, cpe_match (the CPE criteria as one flat list) and cpe_configurations (NVD's configurations as NVD sent them, with each AND/OR operator, negate, versionStartExcluding and matchCriteriaId; absent where EchelonGraph has stored none, which is not a finding that no product is affected), published, modified and updated_at; each field only where the record has it. Pass a CVE ID like CVE-2023-44487. ${SCORE_ASSESSED_DESCRIPTION} ${FEED_ENVELOPE}`,
2138
+ description: `Full record for one CVE: description, severity, cvss_v3_score, cvss_v4_score and cvss_v4_severity (when the record has a CVSS v4 score), echelongraph_score and echelongraph_severity with score_confidence (EchelonGraph's multi-source score) and score_assessed (whether EchelonGraph has scored it), epss_score and epss_percentile, CISA-KEV status (kev_listed, kev_added_date, and kev_ransomware for known ransomware-campaign use), ghsa_id (GitHub GHSA), references, cpe_match (the CPE criteria as one flat list) and cpe_configurations (NVD's configurations as NVD sent them, with each AND/OR operator, negate, versionStartExcluding and matchCriteriaId; absent where EchelonGraph has stored none, which is not a finding that no product is affected), published, modified and updated_at; each field only where the record has it. Pass a CVE ID like CVE-2023-44487. ${SCORE_ASSESSED_DESCRIPTION} ${FEED_ENVELOPE} ${TEXT_BUDGET_DESCRIPTION} Cut, each list in the record keeps its first entries, and the note names each list cut with its full length.`,
2005
2139
  inputSchema: z.object({ cve_id: CVE_ID_ARG }),
2006
2140
  outputSchema: GET_CVE_OUTPUT,
2007
2141
  annotations: ANNOTATIONS,
2008
2142
  }, async ({ cve_id }) => checked("get_cve", GET_CVE_OUTPUT, await getCVE(cve_id)));
2009
2143
  server.registerTool("cve_exposure", {
2010
2144
  title: "Internet exposure for one CVE",
2011
- description: `${CVE_EXPOSURE_DESCRIPTION} Its structured result's state is not_assessed with measured_at null: the per-CVE answer says when EchelonGraph last wrote a row (last_seen), not when any counted service was observed, so no count is presented as a dated measurement; the count is still relayed, labelled, as what the radar holds on record. exposure_state says what the count is: exposed, measured_zero, not_assessed or tracking_unknown; coverage.in_scope is the API's tracked verdict; freshness is null, since the per-CVE answer carries no last completed check; data is the API's JSON. The result's last text block repeats the structured result without data (the first text block), without the note's sentences (the text block before it), with which notes ends, and without method where the note quotes it verbatim ("Method: …").`,
2145
+ description: `${CVE_EXPOSURE_DESCRIPTION} Its structured result's state is not_assessed with measured_at null: the per-CVE answer says when EchelonGraph last wrote a row (last_seen), not when any counted service was observed, so no count is presented as a dated measurement; the count is still relayed, labelled, as what the radar holds on record. exposure_state says what the count is: exposed, measured_zero, not_assessed or tracking_unknown; coverage.in_scope is the API's tracked verdict; freshness is null, since the per-CVE answer carries no last completed check; data is the API's JSON. The result's last text block repeats the structured result without data (the first text block), without the note's sentences (the text block before it), with which notes ends, and without method where the note quotes it verbatim ("Method: …"). ${TEXT_BUDGET_DESCRIPTION}`,
2012
2146
  inputSchema: z.object({ cve_id: CVE_ID_ARG }),
2013
2147
  outputSchema: CVE_EXPOSURE_OUTPUT,
2014
2148
  annotations: ANNOTATIONS,
2015
2149
  }, async ({ cve_id }) => checked("cve_exposure", CVE_EXPOSURE_OUTPUT, await cveExposure(cve_id)));
2016
2150
  server.registerTool("exposure_radar", {
2017
2151
  title: "Exposure radar totals",
2018
- description: `${EXPOSURE_RADAR_DESCRIPTION} Its structured result's state is not_assessed with measured_at null: every radar answered, but none gives one time at which what it counts was observed (mcp_servers dates its verdicts at most by a window, mcp_servers.window), so no count is presented as a dated measurement; each count is still relayed, labelled, as what that radar holds on record. freshness gives each radar's last_run_at (and running for shadow_ai, enabled for mcp_servers) where the API serves one; coverage names the radars that answered; data is the relayed result above. The result's last text block repeats the structured result without data (the first text block) and without the note's sentences (the text block before it), with which notes ends.`,
2152
+ description: `${EXPOSURE_RADAR_DESCRIPTION} Its structured result's state is not_assessed with measured_at null: every radar answered, but none gives one time at which what it counts was observed (mcp_servers dates its verdicts at most by a window, mcp_servers.window), so no count is presented as a dated measurement; each count is still relayed, labelled, as what that radar holds on record. freshness gives each radar's last_run_at (and running for shadow_ai, enabled for mcp_servers) where the API serves one; coverage names the radars that answered; data is the relayed result above. The result's last text block repeats the structured result without data (the first text block) and without the note's sentences (the text block before it), with which notes ends. ${TEXT_BUDGET_DESCRIPTION}`,
2019
2153
  outputSchema: EXPOSURE_RADAR_OUTPUT,
2020
2154
  annotations: ANNOTATIONS,
2021
2155
  }, async () => checked("exposure_radar", EXPOSURE_RADAR_OUTPUT, await exposureRadar()));
@@ -2028,7 +2162,7 @@ export function createServer() {
2028
2162
  registerCveIntel(server);
2029
2163
  registerGetCwe(server);
2030
2164
  // #2719: vendor_advisories_for_cve, get_vendor_advisory, search_vendor_advisories.
2031
- registerVendorAdvisoryTools(server, { api, failed, badInput, crashed, succeeded, checked, okHead, envelopeSchema, annotations: ANNOTATIONS });
2165
+ registerVendorAdvisoryTools(server, { api, failed, describeFailure, badInput, crashed, succeeded, checked, okHead, envelopeSchema, annotations: ANNOTATIONS });
2032
2166
  // #2722: prompts and resources, in prompts.ts and resources.ts. Both lists are fixed per
2033
2167
  // connection, so listChanged is false above.
2034
2168
  registerPrompts(server, { cveId: CVE_ID });
package/dist/resources.js CHANGED
@@ -22,6 +22,8 @@ export const METHODOLOGY = `# How EchelonGraph MCP results are measured
22
22
 
23
23
  Every tool result carries an evidence envelope in its structuredContent, and repeats it in its last text block (less what an earlier text block already carries verbatim), so a client that passes text blocks alone still sees it.
24
24
 
25
+ A success's first text block is the API's JSON, cut to fit 30,000 characters when it is longer: the note then says what the cut leaves out and how to read it (TEXT CUT), and structuredContent's data holds the answer whole.
26
+
25
27
  ## Envelope fields
26
28
 
27
29
  | Field | What it holds |