@cyanheads/who-gho-mcp-server 0.1.8 → 0.1.10

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 (22) hide show
  1. package/CLAUDE.md +18 -8
  2. package/README.md +1 -1
  3. package/dist/mcp-server/tools/definitions/who-get-indicator-metadata.tool.d.ts +1 -1
  4. package/dist/mcp-server/tools/definitions/who-get-indicator-metadata.tool.d.ts.map +1 -1
  5. package/dist/mcp-server/tools/definitions/who-list-dimension-values.tool.d.ts +1 -1
  6. package/dist/mcp-server/tools/definitions/who-list-dimension-values.tool.d.ts.map +1 -1
  7. package/dist/mcp-server/tools/definitions/who-list-dimensions.tool.d.ts +1 -1
  8. package/dist/mcp-server/tools/definitions/who-list-dimensions.tool.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/who-list-indicators.tool.d.ts +5 -3
  10. package/dist/mcp-server/tools/definitions/who-list-indicators.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/who-list-indicators.tool.js +17 -11
  12. package/dist/mcp-server/tools/definitions/who-list-indicators.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.d.ts +11 -4
  14. package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.js +69 -17
  16. package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/who-search-indicators.tool.d.ts +5 -3
  18. package/dist/mcp-server/tools/definitions/who-search-indicators.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/who-search-indicators.tool.js +19 -18
  20. package/dist/mcp-server/tools/definitions/who-search-indicators.tool.js.map +1 -1
  21. package/package.json +5 -4
  22. package/server.json +3 -3
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** @cyanheads/who-gho-mcp-server
4
- **Version:** 0.1.8
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.9`
4
+ **Version:** 0.1.10
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
6
6
  **Engines:** Bun ≥1.3.2, Node ≥24.0.0
7
7
 
8
8
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -35,7 +35,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
35
35
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
36
36
  - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
37
37
  - **Secrets in env vars only** — never hardcoded.
38
- - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed before moving on. The comment is for future readers — state the concrete changes, not the conversation that produced them.
38
+ - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
39
39
 
40
40
  ---
41
41
 
@@ -137,6 +137,10 @@ export function getServerConfig() {
137
137
 
138
138
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
139
139
 
140
+ ### Server instructions
141
+
142
+ `createApp({ instructions })` — optional server-level orientation, sent to clients on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
143
+
140
144
  ---
141
145
 
142
146
  ## Context
@@ -163,6 +167,8 @@ Handlers throw — the framework catches, classifies, and formats.
163
167
  **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
164
168
 
165
169
  ```ts
170
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
171
+
166
172
  errors: [
167
173
  { reason: 'no_match', code: JsonRpcErrorCode.NotFound,
168
174
  when: 'No item matched the query',
@@ -250,13 +256,14 @@ Available skills:
250
256
  | `add-service` | Scaffold a new service integration |
251
257
  | `add-test` | Scaffold test file for a tool, resource, or service |
252
258
  | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
253
- | `tool-defs-analysis` | Read-only audit of definition language: voice, leaks, defaults, recovery hints, examples |
259
+ | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
254
260
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
261
+ | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
255
262
  | `devcheck` | Lint, format, typecheck, audit |
256
263
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
257
- | `maintenance` | Investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest` |
258
- | `git-wrapup` | Version bump, changelog entry, commit, and annotated tag — the pre-release wrapup workflow |
259
- | `release-and-publish` | Ship a release: verification gate, push commits+tags, publish to npm / MCP Registry / GHCR / `.mcpb` bundle on GitHub Releases |
264
+ | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
265
+ | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
266
+ | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
260
267
  | `report-issue-framework` | File bug/feature request against @cyanheads/mcp-ts-core |
261
268
  | `report-issue-local` | File bug/feature request against this server's repo |
262
269
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
@@ -264,7 +271,7 @@ Available skills:
264
271
  | `api-config` | AppConfig, parseConfig, env vars |
265
272
  | `api-context` | Context interface, logger, state, progress |
266
273
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
267
- | `api-linter` | Definition lint rules reference (`format-parity`, `schema-*`, `server-json-*`, …) |
274
+ | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
268
275
  | `api-services` | LLM, Speech, Graph services |
269
276
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
270
277
  | `api-testing` | createMockContext, test patterns |
@@ -372,4 +379,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
372
379
  - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
373
380
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
374
381
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
382
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
383
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
384
+ - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
375
385
  - [ ] `bun run devcheck` passes
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.8-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/who-gho-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/who-gho-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/who-gho-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.1.10-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/who-gho-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/who-gho-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/who-gho-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -21,5 +21,5 @@ export declare const whoGetIndicatorMetadata: import("@cyanheads/mcp-ts-core").T
21
21
  readonly code: JsonRpcErrorCode.NotFound;
22
22
  readonly when: "All requested indicator codes returned empty metadata.";
23
23
  readonly recovery: "Use who_search_indicators to find valid indicator codes matching your topic and retry.";
24
- }]>;
24
+ }], undefined>;
25
25
  //# sourceMappingURL=who-get-indicator-metadata.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"who-get-indicator-metadata.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-get-indicator-metadata.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;GAmIlC,CAAC"}
1
+ {"version":3,"file":"who-get-indicator-metadata.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-get-indicator-metadata.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;cAmIlC,CAAC"}
@@ -20,5 +20,5 @@ export declare const whoListDimensionValues: import("@cyanheads/mcp-ts-core").To
20
20
  readonly code: JsonRpcErrorCode.NotFound;
21
21
  readonly when: "The dimension code returned no values — it may not exist in the GHO catalog.";
22
22
  readonly recovery: "Use who_list_dimensions to discover valid dimension type codes and retry with a correct code.";
23
- }]>;
23
+ }], undefined>;
24
24
  //# sourceMappingURL=who-list-dimension-values.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"who-list-dimension-values.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-dimension-values.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;GAgFjC,CAAC"}
1
+ {"version":3,"file":"who-list-dimension-values.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-dimension-values.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;cAgFjC,CAAC"}
@@ -8,5 +8,5 @@ export declare const whoListDimensions: import("@cyanheads/mcp-ts-core").ToolDef
8
8
  code: z.ZodString;
9
9
  title: z.ZodString;
10
10
  }, z.core.$strip>>;
11
- }, z.core.$strip>, undefined>;
11
+ }, z.core.$strip>, undefined, undefined>;
12
12
  //# sourceMappingURL=who-list-dimensions.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"who-list-dimensions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-dimensions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,iBAAiB;;;;;6BAmC5B,CAAC"}
1
+ {"version":3,"file":"who-list-dimensions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-dimensions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,iBAAiB;;;;;wCAmC5B,CAAC"}
@@ -11,7 +11,9 @@ export declare const whoListIndicators: import("@cyanheads/mcp-ts-core").ToolDef
11
11
  indicatorCode: z.ZodString;
12
12
  indicatorName: z.ZodString;
13
13
  }, z.core.$strip>>;
14
- total: z.ZodNumber;
15
- hasMore: z.ZodBoolean;
16
- }, z.core.$strip>, undefined>;
14
+ }, z.core.$strip>, undefined, {
15
+ readonly totalCount: z.ZodNumber;
16
+ readonly hasMore: z.ZodBoolean;
17
+ readonly pageInfo: z.ZodString;
18
+ }>;
17
19
  //# sourceMappingURL=who-list-indicators.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"who-list-indicators.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,iBAAiB;;;;;;;;;;6BAkE5B,CAAC"}
1
+ {"version":3,"file":"who-list-indicators.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EA2E5B,CAAC"}
@@ -38,23 +38,29 @@ export const whoListIndicators = tool('who_list_indicators', {
38
38
  })
39
39
  .describe('An indicator entry with its code and name.'))
40
40
  .describe('Indicators for the requested page.'),
41
- total: z.number().describe('Total number of indicators in the GHO catalog.'),
42
- hasMore: z.boolean().describe('True when more indicators exist beyond the current page.'),
43
41
  }),
42
+ // Agent-facing pagination context: catalog total and whether more pages exist.
43
+ // Lives in enrichment so it reaches both structuredContent and content[] alike.
44
+ enrichment: {
45
+ totalCount: z.number().describe('Total number of indicators in the GHO catalog.'),
46
+ hasMore: z.boolean().describe('True when more indicators exist beyond the current page.'),
47
+ pageInfo: z
48
+ .string()
49
+ .describe('Human-readable page position, e.g. "offset 0, showing 50 of 3059". Use to construct the next offset.'),
50
+ },
44
51
  async handler(input, ctx) {
45
52
  ctx.log.info('Listing indicators', { limit: input.limit, offset: input.offset });
46
53
  const { indicators, total } = await getGhoService().listIndicators({ limit: input.limit, offset: input.offset }, ctx);
47
- return {
48
- indicators,
49
- total,
50
- hasMore: input.offset + indicators.length < total,
51
- };
54
+ const hasMore = input.offset + indicators.length < total;
55
+ ctx.enrich.total(total);
56
+ ctx.enrich({
57
+ hasMore,
58
+ pageInfo: `offset ${input.offset}, showing ${indicators.length} of ${total}`,
59
+ });
60
+ return { indicators };
52
61
  },
53
62
  format: (result) => {
54
- const lines = [
55
- `**Indicators (${result.indicators.length} shown, ${result.total} total, hasMore: ${result.hasMore}):**`,
56
- '',
57
- ];
63
+ const lines = [`**Indicators (showing ${result.indicators.length}):**`, ''];
58
64
  for (const ind of result.indicators) {
59
65
  lines.push(`- **${ind.indicatorCode}**: ${ind.indicatorName}`);
60
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"who-list-indicators.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC3D,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,8EAA8E;QAC9E,kGAAkG;QAClG,0EAA0E;IAC5E,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,+DAA+D,CAAC;QAC5E,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CAAC,8CAA8C,CAAC;KAC5D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE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C,OAAO,GAAG,CAAC,aAAa,OAAO,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"who-list-indicators.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-list-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC3D,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,8EAA8E;QAC9E,kGAAkG;QAClG,0EAA0E;IAC5E,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,+DAA+D,CAAC;QAC5E,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CAAC,8CAA8C,CAAC;KAC5D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC;aACV,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR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E;QACjB,MAAM,KAAK,GAAG,CAAC,yBAAyB,MAAM,CAAC,UAAU,CAAC,MAAM,MAAM,EAAE,EAAE,CAAC,CAAC;QAC5E,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,aAAa,OAAO,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -36,9 +36,6 @@ export declare const whoQueryIndicatorData: import("@cyanheads/mcp-ts-core").Too
36
36
  displayValue: z.ZodOptional<z.ZodString>;
37
37
  comments: z.ZodOptional<z.ZodString>;
38
38
  }, z.core.$strip>>;
39
- totalRows: z.ZodNumber;
40
- truncated: z.ZodBoolean;
41
- truncatedNote: z.ZodOptional<z.ZodString>;
42
39
  }, z.core.$strip>, readonly [{
43
40
  readonly reason: "indicator_not_found";
44
41
  readonly code: JsonRpcErrorCode.NotFound;
@@ -54,5 +51,15 @@ export declare const whoQueryIndicatorData: import("@cyanheads/mcp-ts-core").Too
54
51
  readonly code: JsonRpcErrorCode.ValidationError;
55
52
  readonly when: "More than one of country_codes, region_codes, or income_group_codes were provided.";
56
53
  readonly recovery: "Provide only one spatial filter type per call. To compare countries and regions, make separate calls.";
57
- }]>;
54
+ }], {
55
+ readonly appliedFilters: z.ZodObject<{
56
+ indicatorCode: z.ZodString;
57
+ spatialFilter: z.ZodOptional<z.ZodString>;
58
+ yearRange: z.ZodOptional<z.ZodString>;
59
+ sex: z.ZodOptional<z.ZodString>;
60
+ dim1Value: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ readonly totalRows: z.ZodNumber;
63
+ readonly notice: z.ZodOptional<z.ZodString>;
64
+ }>;
58
65
  //# sourceMappingURL=who-query-indicator-data.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"who-query-indicator-data.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-query-indicator-data.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8QhC,CAAC"}
1
+ {"version":3,"file":"who-query-indicator-data.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-query-indicator-data.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuUhC,CAAC"}
@@ -128,17 +128,50 @@ export const whoQueryIndicatorData = tool('who_query_indicator_data', {
128
128
  })
129
129
  .describe('A single data row from the GHO indicator dataset.'))
130
130
  .describe('Data rows matching the query.'),
131
+ }),
132
+ // Agent-facing result context: effective filter echo, total row count, and truncation
133
+ // notice when the limit was reached. Lives in enrichment so it reaches structuredContent
134
+ // + content[] alike without a format() entry.
135
+ enrichment: {
136
+ appliedFilters: z
137
+ .object({
138
+ indicatorCode: z.string().describe('Indicator code that was queried.'),
139
+ spatialFilter: z
140
+ .string()
141
+ .optional()
142
+ .describe('Active spatial filter summary, e.g. "country_codes: JPN,USA" or "region_codes: EUR".'),
143
+ yearRange: z
144
+ .string()
145
+ .optional()
146
+ .describe('Applied year range, e.g. "2015–2023". Absent when no year filter was set.'),
147
+ sex: z.string().optional().describe('Sex filter value applied, if any.'),
148
+ dim1Value: z.string().optional().describe('dim1_value filter applied, if any.'),
149
+ })
150
+ .describe('Filters that were applied to the query.'),
131
151
  totalRows: z
132
152
  .number()
133
153
  .describe('Total row count matching the query on the server (before the limit is applied).'),
134
- truncated: z
135
- .boolean()
136
- .describe('True when totalRows exceeds the limit and not all rows were returned.'),
137
- truncatedNote: z
154
+ notice: z
138
155
  .string()
139
156
  .optional()
140
- .describe('Present when truncated is true. Explains how to retrieve additional rows, e.g. by narrowing filters or increasing the limit.'),
141
- }),
157
+ .describe('Present when the limit was reached and not all rows were returned. Explains how to retrieve additional rows.'),
158
+ },
159
+ enrichmentTrailer: {
160
+ appliedFilters: {
161
+ render: (filters) => {
162
+ const parts = [`- **Indicator:** ${filters.indicatorCode}`];
163
+ if (filters.spatialFilter)
164
+ parts.push(`- **Spatial:** ${filters.spatialFilter}`);
165
+ if (filters.yearRange)
166
+ parts.push(`- **Years:** ${filters.yearRange}`);
167
+ if (filters.sex)
168
+ parts.push(`- **Sex:** ${filters.sex}`);
169
+ if (filters.dim1Value)
170
+ parts.push(`- **Dim1:** ${filters.dim1Value}`);
171
+ return `**Applied Filters:**\n${parts.join('\n')}`;
172
+ },
173
+ },
174
+ },
142
175
  errors: [
143
176
  {
144
177
  reason: 'indicator_not_found',
@@ -198,19 +231,38 @@ export const whoQueryIndicatorData = tool('who_query_indicator_data', {
198
231
  if (rows.length === 0) {
199
232
  throw ctx.fail('no_data', `Indicator "${input.indicator_code}" returned no data for the applied filters.`, { indicatorCode: input.indicator_code, ...ctx.recoveryFor('no_data') });
200
233
  }
201
- const truncatedNote = truncated
202
- ? `Showing ${input.limit} of ${totalRows} rows. Narrow the filters (year range, spatial codes) or increase the limit (max 1000) to retrieve more.`
203
- : undefined;
204
- return { rows, totalRows, truncated, ...(truncatedNote && { truncatedNote }) };
234
+ // Build a human-readable spatial filter summary for the enrichment echo.
235
+ let spatialFilter;
236
+ if (input.country_codes?.length)
237
+ spatialFilter = `country_codes: ${input.country_codes.join(',')}`;
238
+ else if (input.region_codes?.length)
239
+ spatialFilter = `region_codes: ${input.region_codes.join(',')}`;
240
+ else if (input.income_group_codes?.length)
241
+ spatialFilter = `income_group_codes: ${input.income_group_codes.join(',')}`;
242
+ const yearRange = input.year_from != null && input.year_to != null
243
+ ? `${input.year_from}–${input.year_to}`
244
+ : input.year_from != null
245
+ ? `from ${input.year_from}`
246
+ : input.year_to != null
247
+ ? `to ${input.year_to}`
248
+ : undefined;
249
+ ctx.enrich({
250
+ appliedFilters: {
251
+ indicatorCode: input.indicator_code,
252
+ ...(spatialFilter && { spatialFilter }),
253
+ ...(yearRange && { yearRange }),
254
+ ...(input.sex && { sex: input.sex }),
255
+ ...(input.dim1_value && { dim1Value: input.dim1_value }),
256
+ },
257
+ totalRows,
258
+ });
259
+ if (truncated) {
260
+ ctx.enrich.notice(`Showing ${input.limit} of ${totalRows} rows. Narrow the filters (year range, spatial codes) or increase the limit (max 1000) to retrieve more.`);
261
+ }
262
+ return { rows };
205
263
  },
206
264
  format: (result) => {
207
- const lines = [
208
- `**Rows: ${result.rows.length} shown${result.truncated ? ` of ${result.totalRows} total (truncated)` : ` of ${result.totalRows} total`}**`,
209
- '',
210
- ];
211
- if (result.truncatedNote) {
212
- lines.push(`> ${result.truncatedNote}`, '');
213
- }
265
+ const lines = [`**Rows returned: ${result.rows.length}**`, ''];
214
266
  for (const row of result.rows) {
215
267
  const spatial = [row.spatialDimType, row.spatialDim, row.spatialLabel]
216
268
  .filter(Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":"who-query-indicator-data.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-query-indicator-data.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,M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AAY,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnF,MAAM,WAAW,GAAG,GAAG,CAAC,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3F,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1D,KAAK,CAAC,IAAI,CACR,MAAM,GAAG,CAAC,aAAa,OAAO,GAAG,CAAC,IAAI,QAAQ,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,EAAE,CAC3H,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -12,12 +12,14 @@ export declare const whoSearchIndicators: import("@cyanheads/mcp-ts-core").ToolD
12
12
  indicatorCode: z.ZodString;
13
13
  indicatorName: z.ZodString;
14
14
  }, z.core.$strip>>;
15
- totalMatches: z.ZodNumber;
16
- note: z.ZodOptional<z.ZodString>;
17
15
  }, z.core.$strip>, readonly [{
18
16
  readonly reason: "no_results";
19
17
  readonly code: JsonRpcErrorCode.NotFound;
20
18
  readonly when: "No indicators matched the query keyword.";
21
19
  readonly recovery: "Try a different keyword or use who_list_indicators to browse the full catalog without a filter.";
22
- }]>;
20
+ }], {
21
+ readonly effectiveQuery: z.ZodString;
22
+ readonly totalCount: z.ZodNumber;
23
+ readonly notice: z.ZodOptional<z.ZodString>;
24
+ }>;
23
25
  //# sourceMappingURL=who-search-indicators.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"who-search-indicators.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-search-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;GA8F9B,CAAC"}
1
+ {"version":3,"file":"who-search-indicators.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-search-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;EAkG9B,CAAC"}
@@ -39,14 +39,22 @@ export const whoSearchIndicators = tool('who_search_indicators', {
39
39
  })
40
40
  .describe('An indicator entry with its code and name.'))
41
41
  .describe('Matching indicators up to the requested limit.'),
42
- totalMatches: z
42
+ }),
43
+ // Agent-facing result context: the search term as echoed, total catalog matches, and
44
+ // truncation notice when the limit was reached. Lives in enrichment (not output) so it
45
+ // reaches structuredContent + content[] alike without a format() entry.
46
+ enrichment: {
47
+ effectiveQuery: z
48
+ .string()
49
+ .describe('Keyword used for the catalog search, as received by the server.'),
50
+ totalCount: z
43
51
  .number()
44
- .describe('Total count of indicators matching the query, before the limit is applied.'),
45
- note: z
52
+ .describe('Total indicators matching the query in the catalog, before the limit is applied.'),
53
+ notice: z
46
54
  .string()
47
55
  .optional()
48
56
  .describe('Present when the limit was reached and more results exist. Suggests how to get additional results.'),
49
- }),
57
+ },
50
58
  errors: [
51
59
  {
52
60
  reason: 'no_results',
@@ -64,25 +72,18 @@ export const whoSearchIndicators = tool('who_search_indicators', {
64
72
  });
65
73
  }
66
74
  const truncated = total > input.limit;
67
- return {
68
- indicators,
69
- totalMatches: total,
70
- ...(truncated && {
71
- note: `Showing ${input.limit} of ${total} matches. Refine the query or increase the limit (max 100) to get more targeted results.`,
72
- }),
73
- };
75
+ ctx.enrich.echo(input.query);
76
+ ctx.enrich.total(total);
77
+ if (truncated) {
78
+ ctx.enrich.notice(`Showing ${input.limit} of ${total} matches. Refine the query or increase the limit (max 100) to get more targeted results.`);
79
+ }
80
+ return { indicators };
74
81
  },
75
82
  format: (result) => {
76
- const lines = [
77
- `**Found ${result.totalMatches} indicator${result.totalMatches === 1 ? '' : 's'} (showing ${result.indicators.length}):**`,
78
- '',
79
- ];
83
+ const lines = [`**Found indicators (showing ${result.indicators.length}):**`, ''];
80
84
  for (const ind of result.indicators) {
81
85
  lines.push(`- **${ind.indicatorCode}**: ${ind.indicatorName}`);
82
86
  }
83
- if (result.note) {
84
- lines.push('', `> ${result.note}`);
85
- }
86
87
  return [{ type: 'text', text: lines.join('\n') }];
87
88
  },
88
89
  });
@@ -1 +1 @@
1
- {"version":3,"file":"who-search-indicators.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-search-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC/D,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,+FAA+F;QAC/F,2EAA2E;QAC3E,2FAA2F;QAC3F,qDAAqD;QACrD,4FAA4F;IAC9F,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK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C,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"who-search-indicators.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/who-search-indicators.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC/D,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,+FAA+F;QAC/F,2EAA2E;QAC3E,2FAA2F;QAC3F,qDAAqD;QACrD,4FAA4F;IAC9F,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,iFAAiF,CAAC;QAC9F,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,8DAA8D,CAAC;KAC5E,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC;aACV,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR,QAAQ,CACP,+EAA+E,CAChF;YACH,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR,QAAQ,CAAC,+DAA+D,CAAC;SAC7E,C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,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7B,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,SAAS,EAAE,CAAC;YACd,GAAG,CAAC,MAAM,CAAC,MAAM,CACf,WAAW,KAAK,CAAC,KAAK,OAAO,KAAK,0FAA0F,CAC7H,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,UAAU,EAAE,CAAC;IACxB,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAG,CAAC,+BAA+B,MAAM,CAAC,UAAU,CAAC,MAAM,MAAM,EAAE,EAAE,CAAC,CAAC;QAClF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,aAAa,OAAO,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/who-gho-mcp-server",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "mcpName": "io.github.cyanheads/who-gho-mcp-server",
5
5
  "description": "Query WHO Global Health Observatory data — 3,059 indicators across 194 member states with country, region, year, and sex filters via MCP. STDIO or Streamable HTTP.",
6
6
  "type": "module",
@@ -16,7 +16,8 @@
16
16
  "clean": "bun run scripts/clean.ts",
17
17
  "devcheck": "bun run scripts/devcheck.ts",
18
18
  "tree": "bun run scripts/tree.ts",
19
- "format": "biome check --write --unsafe",
19
+ "format": "biome check --write .",
20
+ "format:unsafe": "biome check --write --unsafe .",
20
21
  "test": "bunx vitest run",
21
22
  "audit:refresh": "rm -f bun.lock && bun install && bun audit",
22
23
  "list-skills": "bun run scripts/list-skills.ts",
@@ -75,12 +76,12 @@
75
76
  "access": "public"
76
77
  },
77
78
  "dependencies": {
78
- "@cyanheads/mcp-ts-core": "^0.9.9",
79
+ "@cyanheads/mcp-ts-core": "^0.9.16",
79
80
  "pino-pretty": "^13.1.3",
80
81
  "zod": "^4.4.3"
81
82
  },
82
83
  "devDependencies": {
83
- "@biomejs/biome": "^2.4.15",
84
+ "@biomejs/biome": "^2.4.16",
84
85
  "@types/node": "^25.9.1",
85
86
  "depcheck": "^1.4.7",
86
87
  "ignore": "^7.0.5",
package/server.json CHANGED
@@ -12,14 +12,14 @@
12
12
  "url": "https://who-gho.caseyjhand.com/mcp"
13
13
  }
14
14
  ],
15
- "version": "0.1.8",
15
+ "version": "0.1.10",
16
16
  "packages": [
17
17
  {
18
18
  "registryType": "npm",
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/who-gho-mcp-server",
21
21
  "runtimeHint": "bun",
22
- "version": "0.1.8",
22
+ "version": "0.1.10",
23
23
  "packageArguments": [
24
24
  {
25
25
  "type": "positional",
@@ -48,7 +48,7 @@
48
48
  "registryBaseUrl": "https://registry.npmjs.org",
49
49
  "identifier": "@cyanheads/who-gho-mcp-server",
50
50
  "runtimeHint": "bun",
51
- "version": "0.1.8",
51
+ "version": "0.1.10",
52
52
  "packageArguments": [
53
53
  {
54
54
  "type": "positional",