@cyanheads/reliefweb-mcp-server 0.1.4 → 0.1.6
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/AGENTS.md +24 -45
- package/CLAUDE.md +24 -45
- package/README.md +22 -1
- package/changelog/0.1.x/0.1.5.md +25 -0
- package/changelog/0.1.x/0.1.6.md +17 -0
- package/changelog/template.md +9 -1
- package/dist/mcp-server/tools/definitions/get-country.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-country.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-disaster.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-disaster.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-report.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-report.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-countries.tool.d.ts +3 -2
- package/dist/mcp-server/tools/definitions/list-countries.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-countries.tool.js +7 -4
- package/dist/mcp-server/tools/definitions/list-countries.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/list-sources.tool.d.ts +3 -2
- package/dist/mcp-server/tools/definitions/list-sources.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-sources.tool.js +7 -4
- package/dist/mcp-server/tools/definitions/list-sources.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-disasters.tool.d.ts +4 -3
- package/dist/mcp-server/tools/definitions/search-disasters.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-disasters.tool.js +10 -13
- package/dist/mcp-server/tools/definitions/search-disasters.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-jobs.tool.d.ts +4 -3
- package/dist/mcp-server/tools/definitions/search-jobs.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-jobs.tool.js +10 -13
- package/dist/mcp-server/tools/definitions/search-jobs.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-reports.tool.d.ts +4 -3
- package/dist/mcp-server/tools/definitions/search-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-reports.tool.js +10 -13
- package/dist/mcp-server/tools/definitions/search-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-training.tool.d.ts +4 -3
- package/dist/mcp-server/tools/definitions/search-training.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-training.tool.js +10 -13
- package/dist/mcp-server/tools/definitions/search-training.tool.js.map +1 -1
- package/package.json +5 -4
- package/server.json +9 -3
package/AGENTS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** @cyanheads/reliefweb-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.
|
|
4
|
+
**Version:** 0.1.6
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
|
8
8
|
**Zod:** ^4.4.3
|
|
@@ -37,7 +37,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
|
|
|
37
37
|
- **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
|
|
38
38
|
- **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
|
|
39
39
|
- **Secrets in env vars only** — never hardcoded.
|
|
40
|
-
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed
|
|
40
|
+
- **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.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -139,6 +139,10 @@ export function getServerConfig() {
|
|
|
139
139
|
|
|
140
140
|
`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.
|
|
141
141
|
|
|
142
|
+
### Server instructions
|
|
143
|
+
|
|
144
|
+
`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.
|
|
145
|
+
|
|
142
146
|
---
|
|
143
147
|
|
|
144
148
|
## Context
|
|
@@ -165,6 +169,8 @@ Handlers throw — the framework catches, classifies, and formats.
|
|
|
165
169
|
**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.
|
|
166
170
|
|
|
167
171
|
```ts
|
|
172
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
173
|
+
|
|
168
174
|
errors: [
|
|
169
175
|
{ reason: 'no_match', code: JsonRpcErrorCode.NotFound,
|
|
170
176
|
when: 'No item matched the query',
|
|
@@ -252,26 +258,27 @@ Available skills:
|
|
|
252
258
|
| `add-service` | Scaffold a new service integration |
|
|
253
259
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
254
260
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
255
|
-
| `tool-defs-analysis` | Read-only audit of definition language
|
|
261
|
+
| `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
|
|
256
262
|
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
263
|
+
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
257
264
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
258
265
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
266
|
+
| `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
|
|
267
|
+
| `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
268
|
+
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
269
|
+
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
270
|
+
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
262
271
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
263
272
|
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
264
273
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
265
274
|
| `api-context` | Context interface, logger, state, progress |
|
|
266
275
|
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
267
|
-
| `api-linter` | Definition
|
|
276
|
+
| `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
|
|
268
277
|
| `api-services` | LLM, Speech, Graph services |
|
|
269
|
-
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
270
278
|
| `api-testing` | createMockContext, test patterns |
|
|
271
279
|
| `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
|
|
280
|
+
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
272
281
|
| `api-workers` | Cloudflare Workers runtime |
|
|
273
|
-
| `report-issue-framework` | File bug/feature request against @cyanheads/mcp-ts-core |
|
|
274
|
-
| `report-issue-local` | File bug/feature request against this server's repo |
|
|
275
282
|
|
|
276
283
|
When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
|
|
277
284
|
|
|
@@ -306,40 +313,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
306
313
|
|
|
307
314
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
|
|
308
315
|
|
|
309
|
-
**README install badges
|
|
310
|
-
|
|
311
|
-
| Client | Mechanism |
|
|
312
|
-
|:-------|:----------|
|
|
313
|
-
| Claude Desktop | Browser downloads the `.mcpb` from the latest GitHub Release; OS file handler routes it to Claude Desktop, which opens the install dialog. No deep-link URL scheme yet — this is the canonical path. |
|
|
314
|
-
| Cursor | Official `https://cursor.com/en/install-mcp` endpoint with base64 JSON config. |
|
|
315
|
-
| VS Code / Insiders | Official `vscode:mcp/install?...` deep link, wrapped in `https://vscode.dev/redirect?url=` so GitHub-rendered markdown doesn't strip the non-HTTP scheme. |
|
|
316
|
-
| Claude Code / Codex | CLI only (`claude mcp add` / `codex mcp add`); no URL scheme. |
|
|
317
|
-
|
|
318
|
-
```markdown
|
|
319
|
-
[](https://github.com/<OWNER>/<REPO>/releases/latest/download/<PACKAGE_NAME>.mcpb)
|
|
320
|
-
[](https://cursor.com/en/install-mcp?name=<PACKAGE_NAME>&config=<BASE64_CONFIG>)
|
|
321
|
-
[](https://vscode.dev/redirect?url=vscode:mcp/install?<URLENCODED_JSON>)
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
Both install links route through HTTPS endpoints (`cursor.com/en/install-mcp` and `vscode.dev/redirect`) — GitHub-rendered markdown strips non-HTTP URL schemes from anchors, so a raw `cursor://` or `vscode:` link won't click through from github.com.
|
|
325
|
-
|
|
326
|
-
Generate the encoded configs (replace `<PACKAGE_NAME>` and add env vars for any required API keys):
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
|
-
# Cursor: base64-encoded JSON. Split command/args, add env when keys are needed.
|
|
330
|
-
echo -n '{"command":"npx","args":["-y","<PACKAGE_NAME>"],"env":{"API_KEY":"your-api-key"}}' | base64
|
|
331
|
-
# Without env (no required keys):
|
|
332
|
-
echo -n '{"command":"npx","args":["-y","<PACKAGE_NAME>"]}' | base64
|
|
333
|
-
|
|
334
|
-
# VS Code: URL-encoded JSON. Same shape plus a `name` field.
|
|
335
|
-
node -p 'encodeURIComponent(JSON.stringify({name:"<SHORT_NAME>",command:"npx",args:["-y","<PACKAGE_NAME>"],env:{API_KEY:"your-api-key"}}))'
|
|
336
|
-
# Without env:
|
|
337
|
-
node -p 'encodeURIComponent(JSON.stringify({name:"<SHORT_NAME>",command:"npx",args:["-y","<PACKAGE_NAME>"]}))'
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
Both clients use the same `{command, args, env}` shape (matching `mcp.json` schema). VS Code adds a top-level `name` field. Omit `env` entirely when no API keys are needed — don't include empty objects or framework-only vars like `MCP_TRANSPORT_TYPE`.
|
|
341
|
-
|
|
342
|
-
The Claude Desktop badge requires the bundle to ship with a stable filename — `bun run bundle` outputs `dist/<PACKAGE_NAME>.mcpb`, and `release-and-publish` attaches that file to the GitHub Release. `releases/latest/download/<PACKAGE_NAME>.mcpb` then redirects to the most recent release.
|
|
316
|
+
**README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `skills/polish-docs-meta/references/readme.md`.
|
|
343
317
|
|
|
344
318
|
---
|
|
345
319
|
|
|
@@ -362,6 +336,8 @@ security: false # optional — true flags security fi
|
|
|
362
336
|
|
|
363
337
|
`breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
|
|
364
338
|
|
|
339
|
+
`agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
|
|
340
|
+
|
|
365
341
|
**Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
|
|
366
342
|
|
|
367
343
|
**Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
|
|
@@ -394,4 +370,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
|
|
|
394
370
|
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
395
371
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
396
372
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
373
|
+
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
|
|
374
|
+
- [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
|
|
375
|
+
- [ ] `.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
|
|
397
376
|
- [ ] `bun run devcheck` passes
|
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** @cyanheads/reliefweb-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.
|
|
4
|
+
**Version:** 0.1.6
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
|
8
8
|
**Zod:** ^4.4.3
|
|
@@ -37,7 +37,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
|
|
|
37
37
|
- **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
|
|
38
38
|
- **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
|
|
39
39
|
- **Secrets in env vars only** — never hardcoded.
|
|
40
|
-
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed
|
|
40
|
+
- **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.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -139,6 +139,10 @@ export function getServerConfig() {
|
|
|
139
139
|
|
|
140
140
|
`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.
|
|
141
141
|
|
|
142
|
+
### Server instructions
|
|
143
|
+
|
|
144
|
+
`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.
|
|
145
|
+
|
|
142
146
|
---
|
|
143
147
|
|
|
144
148
|
## Context
|
|
@@ -165,6 +169,8 @@ Handlers throw — the framework catches, classifies, and formats.
|
|
|
165
169
|
**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.
|
|
166
170
|
|
|
167
171
|
```ts
|
|
172
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
173
|
+
|
|
168
174
|
errors: [
|
|
169
175
|
{ reason: 'no_match', code: JsonRpcErrorCode.NotFound,
|
|
170
176
|
when: 'No item matched the query',
|
|
@@ -252,26 +258,27 @@ Available skills:
|
|
|
252
258
|
| `add-service` | Scaffold a new service integration |
|
|
253
259
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
254
260
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
255
|
-
| `tool-defs-analysis` | Read-only audit of definition language
|
|
261
|
+
| `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
|
|
256
262
|
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
263
|
+
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
257
264
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
258
265
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
266
|
+
| `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
|
|
267
|
+
| `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
268
|
+
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
269
|
+
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
270
|
+
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
262
271
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
263
272
|
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
264
273
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
265
274
|
| `api-context` | Context interface, logger, state, progress |
|
|
266
275
|
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
267
|
-
| `api-linter` | Definition
|
|
276
|
+
| `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
|
|
268
277
|
| `api-services` | LLM, Speech, Graph services |
|
|
269
|
-
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
270
278
|
| `api-testing` | createMockContext, test patterns |
|
|
271
279
|
| `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
|
|
280
|
+
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
272
281
|
| `api-workers` | Cloudflare Workers runtime |
|
|
273
|
-
| `report-issue-framework` | File bug/feature request against @cyanheads/mcp-ts-core |
|
|
274
|
-
| `report-issue-local` | File bug/feature request against this server's repo |
|
|
275
282
|
|
|
276
283
|
When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
|
|
277
284
|
|
|
@@ -306,40 +313,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
306
313
|
|
|
307
314
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
|
|
308
315
|
|
|
309
|
-
**README install badges
|
|
310
|
-
|
|
311
|
-
| Client | Mechanism |
|
|
312
|
-
|:-------|:----------|
|
|
313
|
-
| Claude Desktop | Browser downloads the `.mcpb` from the latest GitHub Release; OS file handler routes it to Claude Desktop, which opens the install dialog. No deep-link URL scheme yet — this is the canonical path. |
|
|
314
|
-
| Cursor | Official `https://cursor.com/en/install-mcp` endpoint with base64 JSON config. |
|
|
315
|
-
| VS Code / Insiders | Official `vscode:mcp/install?...` deep link, wrapped in `https://vscode.dev/redirect?url=` so GitHub-rendered markdown doesn't strip the non-HTTP scheme. |
|
|
316
|
-
| Claude Code / Codex | CLI only (`claude mcp add` / `codex mcp add`); no URL scheme. |
|
|
317
|
-
|
|
318
|
-
```markdown
|
|
319
|
-
[](https://github.com/<OWNER>/<REPO>/releases/latest/download/<PACKAGE_NAME>.mcpb)
|
|
320
|
-
[](https://cursor.com/en/install-mcp?name=<PACKAGE_NAME>&config=<BASE64_CONFIG>)
|
|
321
|
-
[](https://vscode.dev/redirect?url=vscode:mcp/install?<URLENCODED_JSON>)
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
Both install links route through HTTPS endpoints (`cursor.com/en/install-mcp` and `vscode.dev/redirect`) — GitHub-rendered markdown strips non-HTTP URL schemes from anchors, so a raw `cursor://` or `vscode:` link won't click through from github.com.
|
|
325
|
-
|
|
326
|
-
Generate the encoded configs (replace `<PACKAGE_NAME>` and add env vars for any required API keys):
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
|
-
# Cursor: base64-encoded JSON. Split command/args, add env when keys are needed.
|
|
330
|
-
echo -n '{"command":"npx","args":["-y","<PACKAGE_NAME>"],"env":{"API_KEY":"your-api-key"}}' | base64
|
|
331
|
-
# Without env (no required keys):
|
|
332
|
-
echo -n '{"command":"npx","args":["-y","<PACKAGE_NAME>"]}' | base64
|
|
333
|
-
|
|
334
|
-
# VS Code: URL-encoded JSON. Same shape plus a `name` field.
|
|
335
|
-
node -p 'encodeURIComponent(JSON.stringify({name:"<SHORT_NAME>",command:"npx",args:["-y","<PACKAGE_NAME>"],env:{API_KEY:"your-api-key"}}))'
|
|
336
|
-
# Without env:
|
|
337
|
-
node -p 'encodeURIComponent(JSON.stringify({name:"<SHORT_NAME>",command:"npx",args:["-y","<PACKAGE_NAME>"]}))'
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
Both clients use the same `{command, args, env}` shape (matching `mcp.json` schema). VS Code adds a top-level `name` field. Omit `env` entirely when no API keys are needed — don't include empty objects or framework-only vars like `MCP_TRANSPORT_TYPE`.
|
|
341
|
-
|
|
342
|
-
The Claude Desktop badge requires the bundle to ship with a stable filename — `bun run bundle` outputs `dist/<PACKAGE_NAME>.mcpb`, and `release-and-publish` attaches that file to the GitHub Release. `releases/latest/download/<PACKAGE_NAME>.mcpb` then redirects to the most recent release.
|
|
316
|
+
**README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `skills/polish-docs-meta/references/readme.md`.
|
|
343
317
|
|
|
344
318
|
---
|
|
345
319
|
|
|
@@ -362,6 +336,8 @@ security: false # optional — true flags security fi
|
|
|
362
336
|
|
|
363
337
|
`breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
|
|
364
338
|
|
|
339
|
+
`agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
|
|
340
|
+
|
|
365
341
|
**Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
|
|
366
342
|
|
|
367
343
|
**Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
|
|
@@ -394,4 +370,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
|
|
|
394
370
|
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
395
371
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
396
372
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
373
|
+
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
|
|
374
|
+
- [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
|
|
375
|
+
- [ ] `.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
|
|
397
376
|
- [ ] `bun run devcheck` passes
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/reliefweb-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/reliefweb-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
+
<div align="center">
|
|
23
|
+
|
|
24
|
+
**Public Hosted Server:** [https://reliefweb.caseyjhand.com/mcp](https://reliefweb.caseyjhand.com/mcp)
|
|
25
|
+
|
|
26
|
+
</div>
|
|
27
|
+
|
|
22
28
|
---
|
|
23
29
|
|
|
24
30
|
## Tools
|
|
@@ -178,6 +184,21 @@ Agent-friendly output:
|
|
|
178
184
|
- [Bun v1.3.2](https://bun.sh/) or higher.
|
|
179
185
|
- A **pre-approved ReliefWeb appname** — register at [ReliefWeb API](https://reliefweb.int/help/api) and set `RELIEFWEB_APP_NAME`. The API has required pre-approved appnames since November 2025; requests without one are rejected.
|
|
180
186
|
|
|
187
|
+
### Public Hosted Instance
|
|
188
|
+
|
|
189
|
+
A public instance is available at `https://reliefweb.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"mcpServers": {
|
|
194
|
+
"reliefweb": {
|
|
195
|
+
"type": "streamable-http",
|
|
196
|
+
"url": "https://reliefweb.caseyjhand.com/mcp"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
181
202
|
### Self-Hosted / Local
|
|
182
203
|
|
|
183
204
|
Add the following to your MCP client configuration file.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "mcp-ts-core ^0.9.9 → ^0.9.13: 413 body cap, HTTP session-init gate, quieter 401/403/400/404 logging, GET /mcp keywords; plugin metadata files; skill updates"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.5 — 2026-05-28
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`.claude-plugin/`** and **`.codex-plugin/`** — Claude Code and Codex plugin metadata files scaffolded per mcp-ts-core 0.9.10.
|
|
12
|
+
- **`CITATION.cff`** — citation metadata file.
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **`@cyanheads/mcp-ts-core`** ^0.9.9 → ^0.9.13. User-facing changes picked up:
|
|
17
|
+
- **`MCP_HTTP_MAX_BODY_BYTES`** — configurable inbound request-body cap (default 1 MiB); oversized requests rejected with HTTP 413 before the SDK parses the body.
|
|
18
|
+
- **HTTP session-init gate** — stateful HTTP mode now rejects non-`initialize` requests without an `Mcp-Session-Id` header with HTTP 400.
|
|
19
|
+
- **Expected client error log levels** — 401, 403, 400, 404 now use `logger.warning` instead of full error pipeline with stack traces, reducing noise in logs.
|
|
20
|
+
- **`GET /mcp` keywords** — `package.json` `keywords` surfaced on the status JSON alongside name, version, and description.
|
|
21
|
+
- **`@biomejs/biome`** ^2.4.15 → ^2.4.16.
|
|
22
|
+
- **Skills** — `code-simplifier` added; `git-wrapup` v1.0 → v1.1; `release-and-publish` updated to v2.7; `api-canvas`, `api-config`, `design-mcp-server`, `polish-docs-meta`, `report-issue-framework`, `migrate-mcp-ts-template` (removed) synced from framework 0.9.10–0.9.13.
|
|
23
|
+
- **`CLAUDE.md` / `AGENTS.md`** — framework version reference updated to `^0.9.13`; plugin file checklist item added.
|
|
24
|
+
</content>
|
|
25
|
+
</invoke>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "enrichment adoption: search/list tools surface true upstream totals and empty-result guidance via typed enrichment block; structuredContent output.notice renamed from output.message"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.6 — 2026-05-30
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **`reliefweb_search_reports`, `reliefweb_search_disasters`, `reliefweb_search_jobs`, `reliefweb_search_training`** — `totalCount` and the empty-result hint moved from `output` fields to the `enrichment` contract. Totals are now emitted via `ctx.enrich.total()`; hints via `ctx.enrich.notice()`. The enrichment block reaches both `structuredContent` (JSON) and `content[]` (markdown trailer) so all client types see the data. **`output.message` renamed to `enrichment.notice`** — value and semantics unchanged; only the key and delivery channel differ.
|
|
12
|
+
- **`reliefweb_list_countries`, `reliefweb_list_sources`** — `totalCount` moved from `output` to `enrichment` contract, emitted via `ctx.enrich.total()`.
|
|
13
|
+
- **`@cyanheads/mcp-ts-core`** ^0.9.13 → ^0.9.16.
|
|
14
|
+
- **Skills** — `add-tool`, `add-app-tool`, `add-service`, `api-context`, `api-linter`, `design-mcp-server`, `git-wrapup`, `maintenance`, `polish-docs-meta`, `setup` synced from framework 0.9.14–0.9.16. `api-context` adds the `ctx.enrich` reference.
|
|
15
|
+
- **`CLAUDE.md` / `AGENTS.md`** — framework version reference updated to `^0.9.16`.
|
|
16
|
+
</content>
|
|
17
|
+
</invoke>
|
package/changelog/template.md
CHANGED
|
@@ -19,6 +19,14 @@ breaking: false
|
|
|
19
19
|
# `## Security` section below. Flagged as `Security` in the rollup so
|
|
20
20
|
# users can triage upgrade urgency at a glance.
|
|
21
21
|
security: false
|
|
22
|
+
|
|
23
|
+
# Optional free-form notes for maintenance agents processing this release.
|
|
24
|
+
# Not rendered in CHANGELOG — consumed by agents running `maintenance` on
|
|
25
|
+
# downstream servers. Use for adoption instructions that don't fit the
|
|
26
|
+
# human-facing sections: new files to create, fields to populate, one-time
|
|
27
|
+
# migration steps. Omit the field entirely when there's nothing to say.
|
|
28
|
+
# agent-notes: |
|
|
29
|
+
# <instructions for downstream maintenance agents>
|
|
22
30
|
---
|
|
23
31
|
|
|
24
32
|
# <version> — YYYY-MM-DD
|
|
@@ -35,7 +43,7 @@ security: false
|
|
|
35
43
|
name the symbol, state what changed, stop. Use a second sentence only when
|
|
36
44
|
it carries weight. If a bullet feels long, it is.
|
|
37
45
|
|
|
38
|
-
Cut: mechanism walkthroughs (those belong in JSDoc, AGENTS.md, or the
|
|
46
|
+
Cut: mechanism walkthroughs (those belong in JSDoc, CLAUDE.md/AGENTS.md, or the
|
|
39
47
|
relevant skill), ceremonial framings ("This release introduces…",
|
|
40
48
|
backwards-compat paragraphs), file-by-file test enumerations, internal
|
|
41
49
|
implementation notes. Prefer code/symbol names over English re-explanations.
|
|
@@ -31,5 +31,5 @@ export declare const reliefwebGetCountry: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
31
31
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
32
32
|
readonly when: "No country profile found for the given ISO3 code.";
|
|
33
33
|
readonly recovery: "Verify the ISO3 code is a valid ISO 3166-1 alpha-3 code (e.g., SYR, AFG, UKR). Use reliefweb_list_countries to browse available country codes.";
|
|
34
|
-
}]>;
|
|
34
|
+
}], undefined>;
|
|
35
35
|
//# sourceMappingURL=get-country.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-country.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-country.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;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-country.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-country.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;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2G9B,CAAC"}
|
|
@@ -38,5 +38,5 @@ export declare const reliefwebGetDisaster: import("@cyanheads/mcp-ts-core").Tool
|
|
|
38
38
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
39
39
|
readonly when: "No disaster found with the given ID.";
|
|
40
40
|
readonly recovery: "Verify the ID is a valid ReliefWeb numeric disaster ID from reliefweb_search_disasters results.";
|
|
41
|
-
}]>;
|
|
41
|
+
}], undefined>;
|
|
42
42
|
//# sourceMappingURL=get-disaster.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-disaster.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-disaster.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,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-disaster.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-disaster.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,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuH/B,CAAC"}
|
|
@@ -26,5 +26,5 @@ export declare const reliefwebGetReport: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
26
26
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
27
27
|
readonly when: "No report found with the given ID.";
|
|
28
28
|
readonly recovery: "Verify the ID is a valid ReliefWeb numeric ID obtained from search results. Use reliefweb_search_reports to discover valid IDs.";
|
|
29
|
-
}]>;
|
|
29
|
+
}], undefined>;
|
|
30
30
|
//# sourceMappingURL=get-report.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-report.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-report.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,kBAAkB;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-report.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-report.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,kBAAkB;;;;;;;;;;;;;;;;;;;;;;cAiF7B,CAAC"}
|
|
@@ -15,6 +15,7 @@ export declare const reliefwebListCountries: import("@cyanheads/mcp-ts-core").To
|
|
|
15
15
|
status: z.ZodOptional<z.ZodString>;
|
|
16
16
|
urlAlias: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
}, z.core.$strip>, undefined, {
|
|
19
|
+
readonly totalCount: z.ZodNumber;
|
|
20
|
+
}>;
|
|
20
21
|
//# sourceMappingURL=list-countries.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-countries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-countries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"list-countries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-countries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;EA2FjC,CAAC"}
|
|
@@ -27,7 +27,7 @@ export const reliefwebListCountries = tool('reliefweb_list_countries', {
|
|
|
27
27
|
.int()
|
|
28
28
|
.min(0)
|
|
29
29
|
.default(0)
|
|
30
|
-
.describe('Zero-based offset for pagination. Use with limit and totalCount to page through results.'),
|
|
30
|
+
.describe('Zero-based offset for pagination. Use with limit and the totalCount enrichment field to page through results.'),
|
|
31
31
|
}),
|
|
32
32
|
output: z.object({
|
|
33
33
|
items: z
|
|
@@ -50,8 +50,10 @@ export const reliefwebListCountries = tool('reliefweb_list_countries', {
|
|
|
50
50
|
})
|
|
51
51
|
.describe('A country or territory tracked by ReliefWeb.'))
|
|
52
52
|
.describe('Countries tracked by ReliefWeb.'),
|
|
53
|
-
totalCount: z.number().describe('Total countries matching the filter before pagination.'),
|
|
54
53
|
}),
|
|
54
|
+
enrichment: {
|
|
55
|
+
totalCount: z.number().describe('Total countries matching the filter before pagination.'),
|
|
56
|
+
},
|
|
55
57
|
async handler(input, ctx) {
|
|
56
58
|
ctx.log.info('reliefweb_list_countries', {
|
|
57
59
|
crisisOnly: input.crisis_only,
|
|
@@ -62,10 +64,11 @@ export const reliefwebListCountries = tool('reliefweb_list_countries', {
|
|
|
62
64
|
limit: input.limit,
|
|
63
65
|
offset: input.offset,
|
|
64
66
|
}, ctx);
|
|
65
|
-
|
|
67
|
+
ctx.enrich.total(result.totalCount);
|
|
68
|
+
return { items: result.items };
|
|
66
69
|
},
|
|
67
70
|
format: (result) => {
|
|
68
|
-
const lines = [
|
|
71
|
+
const lines = [];
|
|
69
72
|
for (const item of result.items) {
|
|
70
73
|
const parts = [`**${item.name}**`];
|
|
71
74
|
if (item.iso3)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-countries.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-countries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,kHAAkH;QAClH,uHAAuH;QACvH,yFAAyF;IAC3F,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,WAAW,EAAE,CAAC;aACX,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,uIAAuI,CACxI;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,OAAO,CAAC,GAAG,CAAC;aACZ,QAAQ,CACP,wGAAwG,CACzG;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"list-countries.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-countries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,kHAAkH;QAClH,uHAAuH;QACvH,yFAAyF;IAC3F,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,WAAW,EAAE,CAAC;aACX,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,uIAAuI,CACxI;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN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
|
|
@@ -17,6 +17,7 @@ export declare const reliefwebListSources: import("@cyanheads/mcp-ts-core").Tool
|
|
|
17
17
|
url: z.ZodOptional<z.ZodString>;
|
|
18
18
|
homepage: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, z.core.$strip>>;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
}, z.core.$strip>, undefined, {
|
|
21
|
+
readonly totalCount: z.ZodNumber;
|
|
22
|
+
}>;
|
|
22
23
|
//# sourceMappingURL=list-sources.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-sources.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-sources.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"list-sources.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-sources.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;EA4F/B,CAAC"}
|
|
@@ -31,7 +31,7 @@ export const reliefwebListSources = tool('reliefweb_list_sources', {
|
|
|
31
31
|
.int()
|
|
32
32
|
.min(0)
|
|
33
33
|
.default(0)
|
|
34
|
-
.describe('Zero-based offset for pagination. Use with limit and totalCount to page through results.'),
|
|
34
|
+
.describe('Zero-based offset for pagination. Use with limit and the totalCount enrichment field to page through results.'),
|
|
35
35
|
}),
|
|
36
36
|
output: z.object({
|
|
37
37
|
items: z
|
|
@@ -49,8 +49,10 @@ export const reliefwebListSources = tool('reliefweb_list_sources', {
|
|
|
49
49
|
})
|
|
50
50
|
.describe('A source organization contributing content to ReliefWeb.'))
|
|
51
51
|
.describe('Source organizations contributing content to ReliefWeb.'),
|
|
52
|
-
totalCount: z.number().describe('Total sources matching the query before pagination.'),
|
|
53
52
|
}),
|
|
53
|
+
enrichment: {
|
|
54
|
+
totalCount: z.number().describe('Total sources matching the query before pagination.'),
|
|
55
|
+
},
|
|
54
56
|
async handler(input, ctx) {
|
|
55
57
|
ctx.log.info('reliefweb_list_sources', {
|
|
56
58
|
text: input.text,
|
|
@@ -63,10 +65,11 @@ export const reliefwebListSources = tool('reliefweb_list_sources', {
|
|
|
63
65
|
limit: input.limit,
|
|
64
66
|
offset: input.offset,
|
|
65
67
|
}, ctx);
|
|
66
|
-
|
|
68
|
+
ctx.enrich.total(result.totalCount);
|
|
69
|
+
return { items: result.items };
|
|
67
70
|
},
|
|
68
71
|
format: (result) => {
|
|
69
|
-
const lines = [
|
|
72
|
+
const lines = [];
|
|
70
73
|
for (const item of result.items) {
|
|
71
74
|
const namePart = item.shortname ? `**${item.shortname}** — ${item.name}` : `**${item.name}**`;
|
|
72
75
|
const typePart = item.types?.length ? ` (${item.types.join(', ')})` : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-sources.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-sources.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,2HAA2H;QAC3H,wCAAwC;QACxC,mIAAmI;IACrI,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,2EAA2E,CAAC;QACxF,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,wGAAwG,CACzG;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,uGAAuG,CACxG;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"list-sources.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-sources.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,2HAA2H;QAC3H,wCAAwC;QACxC,mIAAmI;IACrI,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,2EAA2E,CAAC;QACxF,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,wGAAwG,CACzG;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CA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CAAC,CAAC;YACpD,IAAI,IAAI,CAAC,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7D,IAAI,IAAI,CAAC,GAAG;gBAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACvD,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"}
|
|
@@ -29,7 +29,8 @@ export declare const reliefwebSearchDisasters: import("@cyanheads/mcp-ts-core").
|
|
|
29
29
|
primaryType: z.ZodOptional<z.ZodString>;
|
|
30
30
|
urlAlias: z.ZodOptional<z.ZodString>;
|
|
31
31
|
}, z.core.$strip>>;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
}, z.core.$strip>, undefined, {
|
|
33
|
+
readonly totalCount: z.ZodNumber;
|
|
34
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}>;
|
|
35
36
|
//# sourceMappingURL=search-disasters.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-disasters.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-disasters.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"search-disasters.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-disasters.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0KnC,CAAC"}
|
|
@@ -60,7 +60,7 @@ export const reliefwebSearchDisasters = tool('reliefweb_search_disasters', {
|
|
|
60
60
|
.int()
|
|
61
61
|
.min(0)
|
|
62
62
|
.default(0)
|
|
63
|
-
.describe('Zero-based offset for pagination. Use with limit and totalCount to page through results.'),
|
|
63
|
+
.describe('Zero-based offset for pagination. Use with limit and the totalCount enrichment field to page through results.'),
|
|
64
64
|
}),
|
|
65
65
|
output: z.object({
|
|
66
66
|
items: z
|
|
@@ -86,12 +86,14 @@ export const reliefwebSearchDisasters = tool('reliefweb_search_disasters', {
|
|
|
86
86
|
})
|
|
87
87
|
.describe('A matching disaster record.'))
|
|
88
88
|
.describe('Matching disasters.'),
|
|
89
|
+
}),
|
|
90
|
+
enrichment: {
|
|
89
91
|
totalCount: z.number().describe('Total disasters matching the query before pagination.'),
|
|
90
|
-
|
|
92
|
+
notice: z
|
|
91
93
|
.string()
|
|
92
94
|
.optional()
|
|
93
95
|
.describe('Recovery hint when results are empty — echoes filters applied and suggests how to broaden.'),
|
|
94
|
-
}
|
|
96
|
+
},
|
|
95
97
|
async handler(input, ctx) {
|
|
96
98
|
ctx.log.info('reliefweb_search_disasters', {
|
|
97
99
|
text: input.text,
|
|
@@ -112,6 +114,7 @@ export const reliefwebSearchDisasters = tool('reliefweb_search_disasters', {
|
|
|
112
114
|
limit: input.limit,
|
|
113
115
|
offset: input.offset,
|
|
114
116
|
}, ctx);
|
|
117
|
+
ctx.enrich.total(result.totalCount);
|
|
115
118
|
if (result.items.length === 0) {
|
|
116
119
|
const filters = [];
|
|
117
120
|
if (input.text)
|
|
@@ -122,19 +125,13 @@ export const reliefwebSearchDisasters = tool('reliefweb_search_disasters', {
|
|
|
122
125
|
filters.push(`type="${input.disaster_type}"`);
|
|
123
126
|
if (input.status)
|
|
124
127
|
filters.push(`status=${input.status}`);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
totalCount: 0,
|
|
128
|
-
message: `No disasters matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
129
|
-
'Try removing filters, using different disaster type names, or setting include_archived=true for historical data.',
|
|
130
|
-
};
|
|
128
|
+
ctx.enrich.notice(`No disasters matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
129
|
+
'Try removing filters, using different disaster type names, or setting include_archived=true for historical data.');
|
|
131
130
|
}
|
|
132
|
-
return { items: result.items
|
|
131
|
+
return { items: result.items };
|
|
133
132
|
},
|
|
134
133
|
format: (result) => {
|
|
135
|
-
const lines = [
|
|
136
|
-
if (result.message)
|
|
137
|
-
lines.push(`\n> ${result.message}`);
|
|
134
|
+
const lines = [];
|
|
138
135
|
for (const item of result.items) {
|
|
139
136
|
lines.push(`\n## ${item.name}`);
|
|
140
137
|
lines.push(`**ID:** ${item.id}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-disasters.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-disasters.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACzE,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,8GAA8G;QAC9G,4DAA4D;QAC5D,kGAAkG;QAClG,iHAAiH;IACnH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,wEAAwE,CAAC;QACrF,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,+GAA+G,CAChH;QACH,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uFAAuF,CACxF;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,yMAAyM,CAC1M;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iHAAiH,CAClH;QACH,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,sEAAsE,CAAC;QACnF,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,iFAAiF,CAAC;QAC9F,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,sHAAsH,CACvH;QACH,gBAAgB,EAAE,CAAC;aAChB,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,+FAA+F,CAChG;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,uGAAuG,CACxG;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"search-disasters.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-disasters.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,4BA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AAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1E,IAAI,IAAI,CAAC,SAAS;gBAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;YACpE,IAAI,IAAI,CAAC,WAAW;gBAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACrE,IAAI,IAAI,CAAC,cAAc;gBAAE,KAAK,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;YACnF,IAAI,IAAI,CAAC,SAAS,EAAE,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACtF,IAAI,IAAI,CAAC,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7D,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"}
|
|
@@ -26,7 +26,8 @@ export declare const reliefwebSearchJobs: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
26
26
|
experienceLevels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
27
|
urlAlias: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, z.core.$strip>>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
}, z.core.$strip>, undefined, {
|
|
30
|
+
readonly totalCount: z.ZodNumber;
|
|
31
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}>;
|
|
32
33
|
//# sourceMappingURL=search-jobs.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-jobs.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-jobs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"search-jobs.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-jobs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;EA4J9B,CAAC"}
|
|
@@ -47,7 +47,7 @@ export const reliefwebSearchJobs = tool('reliefweb_search_jobs', {
|
|
|
47
47
|
.int()
|
|
48
48
|
.min(0)
|
|
49
49
|
.default(0)
|
|
50
|
-
.describe('Zero-based offset for pagination. Use with limit and totalCount to page through results.'),
|
|
50
|
+
.describe('Zero-based offset for pagination. Use with limit and the totalCount enrichment field to page through results.'),
|
|
51
51
|
}),
|
|
52
52
|
output: z.object({
|
|
53
53
|
items: z
|
|
@@ -76,12 +76,14 @@ export const reliefwebSearchJobs = tool('reliefweb_search_jobs', {
|
|
|
76
76
|
})
|
|
77
77
|
.describe('A matching job listing.'))
|
|
78
78
|
.describe('Matching job listings.'),
|
|
79
|
+
}),
|
|
80
|
+
enrichment: {
|
|
79
81
|
totalCount: z.number().describe('Total jobs matching the query before pagination.'),
|
|
80
|
-
|
|
82
|
+
notice: z
|
|
81
83
|
.string()
|
|
82
84
|
.optional()
|
|
83
85
|
.describe('Recovery hint when results are empty — echoes filters applied and suggests how to broaden.'),
|
|
84
|
-
}
|
|
86
|
+
},
|
|
85
87
|
async handler(input, ctx) {
|
|
86
88
|
ctx.log.info('reliefweb_search_jobs', {
|
|
87
89
|
text: input.text,
|
|
@@ -99,6 +101,7 @@ export const reliefwebSearchJobs = tool('reliefweb_search_jobs', {
|
|
|
99
101
|
limit: input.limit,
|
|
100
102
|
offset: input.offset,
|
|
101
103
|
}, ctx);
|
|
104
|
+
ctx.enrich.total(result.totalCount);
|
|
102
105
|
if (result.items.length === 0) {
|
|
103
106
|
const filters = [];
|
|
104
107
|
if (input.text)
|
|
@@ -107,19 +110,13 @@ export const reliefwebSearchJobs = tool('reliefweb_search_jobs', {
|
|
|
107
110
|
filters.push(`country=${input.country}`);
|
|
108
111
|
if (input.career_category)
|
|
109
112
|
filters.push(`career_category="${input.career_category}"`);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
totalCount: 0,
|
|
113
|
-
message: `No jobs matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
114
|
-
'Try broader keywords, remove the country filter, or check the career category spelling.',
|
|
115
|
-
};
|
|
113
|
+
ctx.enrich.notice(`No jobs matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
114
|
+
'Try broader keywords, remove the country filter, or check the career category spelling.');
|
|
116
115
|
}
|
|
117
|
-
return { items: result.items
|
|
116
|
+
return { items: result.items };
|
|
118
117
|
},
|
|
119
118
|
format: (result) => {
|
|
120
|
-
const lines = [
|
|
121
|
-
if (result.message)
|
|
122
|
-
lines.push(`\n> ${result.message}`);
|
|
119
|
+
const lines = [];
|
|
123
120
|
for (const item of result.items) {
|
|
124
121
|
lines.push(`\n## ${item.title}`);
|
|
125
122
|
lines.push(`**ID:** ${item.id}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-jobs.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-jobs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC/D,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,wHAAwH;QACxH,qFAAqF;QACrF,uDAAuD;IACzD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,mFAAmF,CACpF;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,kGAAkG,CACnG;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,gFAAgF,CAAC;QAC7F,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,qLAAqL,CACtL;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,sGAAsG,CACvG;QACH,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uFAAuF,CACxF;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,uGAAuG,CACxG;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"search-jobs.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-jobs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,C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,CAAC,CAAC;YACrE,IAAI,IAAI,CAAC,WAAW;gBAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACrE,IAAI,IAAI,CAAC,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7D,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"}
|
|
@@ -34,7 +34,8 @@ export declare const reliefwebSearchReports: import("@cyanheads/mcp-ts-core").To
|
|
|
34
34
|
fileUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
35
|
headlineSummary: z.ZodOptional<z.ZodString>;
|
|
36
36
|
}, z.core.$strip>>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
}, z.core.$strip>, undefined, {
|
|
38
|
+
readonly totalCount: z.ZodNumber;
|
|
39
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}>;
|
|
40
41
|
//# sourceMappingURL=search-reports.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAIjD,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"search-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAIjD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0MjC,CAAC"}
|
|
@@ -74,7 +74,7 @@ export const reliefwebSearchReports = tool('reliefweb_search_reports', {
|
|
|
74
74
|
.int()
|
|
75
75
|
.min(0)
|
|
76
76
|
.default(0)
|
|
77
|
-
.describe('Zero-based offset for pagination. Use with limit and totalCount
|
|
77
|
+
.describe('Zero-based offset for pagination. Use with limit and the totalCount enrichment field to page through large result sets.'),
|
|
78
78
|
}),
|
|
79
79
|
output: z.object({
|
|
80
80
|
items: z
|
|
@@ -108,12 +108,14 @@ export const reliefwebSearchReports = tool('reliefweb_search_reports', {
|
|
|
108
108
|
})
|
|
109
109
|
.describe('A matching report summary.'))
|
|
110
110
|
.describe('Matching reports (summaries only — use reliefweb_get_report for full body).'),
|
|
111
|
+
}),
|
|
112
|
+
enrichment: {
|
|
111
113
|
totalCount: z.number().describe('Total reports matching the query before pagination.'),
|
|
112
|
-
|
|
114
|
+
notice: z
|
|
113
115
|
.string()
|
|
114
116
|
.optional()
|
|
115
117
|
.describe('Recovery hint when results are empty — echoes the filters applied and suggests how to broaden. Absent on successful result pages.'),
|
|
116
|
-
}
|
|
118
|
+
},
|
|
117
119
|
async handler(input, ctx) {
|
|
118
120
|
ctx.log.info('reliefweb_search_reports', {
|
|
119
121
|
text: input.text,
|
|
@@ -136,6 +138,7 @@ export const reliefwebSearchReports = tool('reliefweb_search_reports', {
|
|
|
136
138
|
limit: input.limit,
|
|
137
139
|
offset: input.offset,
|
|
138
140
|
}, ctx);
|
|
141
|
+
ctx.enrich.total(result.totalCount);
|
|
139
142
|
if (result.items.length === 0) {
|
|
140
143
|
const filters = [];
|
|
141
144
|
if (input.text)
|
|
@@ -146,19 +149,13 @@ export const reliefwebSearchReports = tool('reliefweb_search_reports', {
|
|
|
146
149
|
filters.push(`format="${input.format}"`);
|
|
147
150
|
if (input.theme)
|
|
148
151
|
filters.push(`theme="${input.theme}"`);
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
totalCount: 0,
|
|
152
|
-
message: `No reports matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
153
|
-
'Try broadening the search by removing filters, using different keywords, or checking country codes.',
|
|
154
|
-
};
|
|
152
|
+
ctx.enrich.notice(`No reports matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
153
|
+
'Try broadening the search by removing filters, using different keywords, or checking country codes.');
|
|
155
154
|
}
|
|
156
|
-
return { items: result.items
|
|
155
|
+
return { items: result.items };
|
|
157
156
|
},
|
|
158
157
|
format: (result) => {
|
|
159
|
-
const lines = [
|
|
160
|
-
if (result.message)
|
|
161
|
-
lines.push(`\n> ${result.message}`);
|
|
158
|
+
const lines = [];
|
|
162
159
|
for (const item of result.items) {
|
|
163
160
|
lines.push(`\n## ${item.title}`);
|
|
164
161
|
lines.push(`**ID:** ${item.id}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,2HAA2H;QAC3H,kFAAkF;QAClF,yGAAyG;QACzG,kGAAkG;QAClG,2DAA2D;IAC7D,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uHAAuH,CACxH;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,Q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,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"search-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,2HAA2H;QAC3H,kFAAkF;QAClF,yGAAyG;QACzG,kGAAkG;QAClG,2DAA2D;IAC7D,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uHAAuH,CACxH;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,qGAAqG,CACtG;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,QAAQ,CACP,8HAA8H,CAC/H;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,gOAAgO,CACjO;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,oHAAoH,CACrH;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,2EAA2E,CAAC;QACxF,MAAM,EAAE,CAAC;aACN,MAAM,EA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ClF,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"}
|
|
@@ -29,7 +29,8 @@ export declare const reliefwebSearchTraining: import("@cyanheads/mcp-ts-core").T
|
|
|
29
29
|
careerCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
30
|
urlAlias: z.ZodOptional<z.ZodString>;
|
|
31
31
|
}, z.core.$strip>>;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
}, z.core.$strip>, undefined, {
|
|
33
|
+
readonly totalCount: z.ZodNumber;
|
|
34
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}>;
|
|
35
36
|
//# sourceMappingURL=search-training.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-training.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-training.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"search-training.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-training.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2KlC,CAAC"}
|
|
@@ -53,7 +53,7 @@ export const reliefwebSearchTraining = tool('reliefweb_search_training', {
|
|
|
53
53
|
.int()
|
|
54
54
|
.min(0)
|
|
55
55
|
.default(0)
|
|
56
|
-
.describe('Zero-based offset for pagination. Use with limit and totalCount to page through results.'),
|
|
56
|
+
.describe('Zero-based offset for pagination. Use with limit and the totalCount enrichment field to page through results.'),
|
|
57
57
|
}),
|
|
58
58
|
output: z.object({
|
|
59
59
|
items: z
|
|
@@ -86,14 +86,16 @@ export const reliefwebSearchTraining = tool('reliefweb_search_training', {
|
|
|
86
86
|
})
|
|
87
87
|
.describe('A matching training opportunity.'))
|
|
88
88
|
.describe('Matching training opportunities.'),
|
|
89
|
+
}),
|
|
90
|
+
enrichment: {
|
|
89
91
|
totalCount: z
|
|
90
92
|
.number()
|
|
91
93
|
.describe('Total training listings matching the query before pagination.'),
|
|
92
|
-
|
|
94
|
+
notice: z
|
|
93
95
|
.string()
|
|
94
96
|
.optional()
|
|
95
97
|
.describe('Recovery hint when results are empty — echoes filters applied and suggests how to broaden.'),
|
|
96
|
-
}
|
|
98
|
+
},
|
|
97
99
|
async handler(input, ctx) {
|
|
98
100
|
ctx.log.info('reliefweb_search_training', {
|
|
99
101
|
text: input.text,
|
|
@@ -113,6 +115,7 @@ export const reliefwebSearchTraining = tool('reliefweb_search_training', {
|
|
|
113
115
|
limit: input.limit,
|
|
114
116
|
offset: input.offset,
|
|
115
117
|
}, ctx);
|
|
118
|
+
ctx.enrich.total(result.totalCount);
|
|
116
119
|
if (result.items.length === 0) {
|
|
117
120
|
const filters = [];
|
|
118
121
|
if (input.text)
|
|
@@ -123,19 +126,13 @@ export const reliefwebSearchTraining = tool('reliefweb_search_training', {
|
|
|
123
126
|
filters.push(`format="${input.format}"`);
|
|
124
127
|
if (input.date_start_from)
|
|
125
128
|
filters.push(`start_from=${input.date_start_from}`);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
totalCount: 0,
|
|
129
|
-
message: `No training matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
130
|
-
'Try broader keywords, remove date range constraints, or check the format spelling.',
|
|
131
|
-
};
|
|
129
|
+
ctx.enrich.notice(`No training matched ${filters.length > 0 ? filters.join(', ') : 'the given filters'}. ` +
|
|
130
|
+
'Try broader keywords, remove date range constraints, or check the format spelling.');
|
|
132
131
|
}
|
|
133
|
-
return { items: result.items
|
|
132
|
+
return { items: result.items };
|
|
134
133
|
},
|
|
135
134
|
format: (result) => {
|
|
136
|
-
const lines = [
|
|
137
|
-
if (result.message)
|
|
138
|
-
lines.push(`\n> ${result.message}`);
|
|
135
|
+
const lines = [];
|
|
139
136
|
for (const item of result.items) {
|
|
140
137
|
lines.push(`\n## ${item.title}`);
|
|
141
138
|
lines.push(`**ID:** ${item.id}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-training.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-training.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,2BAA2B,EAAE;IACvE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,wIAAwI;QACxI,iFAAiF;QACjF,sFAAsF;QACtF,kFAAkF;IACpF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,yEAAyE,CAAC;QACtF,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,sGAAsG,CACvG;QACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;QAC/F,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,4FAA4F,CAC7F;QACH,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,mJAAmJ,CACpJ;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,uEAAuE,CAAC;QACpF,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,uHAAuH,CACxH;QACH,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,6GAA6G,CAC9G;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,uGAAuG,CACxG;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"search-training.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-training.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,2BAA2B,EAAE;IACvE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,wIAAwI;QACxI,iFAAiF;QACjF,sFAAsF;QACtF,kFAAkF;IACpF,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAA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AC,EAAE,CAAC,CAAC;YACtF,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC7E,IAAI,IAAI,CAAC,SAAS;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;YAChE,IAAI,IAAI,CAAC,OAAO;gBAAE,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1D,IAAI,IAAI,CAAC,gBAAgB;gBAAE,KAAK,CAAC,IAAI,CAAC,8BAA8B,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;YAC7F,IAAI,IAAI,CAAC,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7D,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/reliefweb-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"mcpName": "io.github.cyanheads/reliefweb-mcp-server",
|
|
5
5
|
"description": "Search ReliefWeb humanitarian reports, disasters, jobs, training, and country profiles via MCP. STDIO or Streamable HTTP.",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"audit:refresh": "rm -f bun.lock && bun install && bun audit",
|
|
28
28
|
"tree": "bun run scripts/tree.ts",
|
|
29
29
|
"list-skills": "bun run scripts/list-skills.ts",
|
|
30
|
-
"format": "biome check --write
|
|
30
|
+
"format": "biome check --write .",
|
|
31
|
+
"format:unsafe": "biome check --write --unsafe .",
|
|
31
32
|
"lint:mcp": "bun run scripts/lint-mcp.ts",
|
|
32
33
|
"lint:packaging": "bun run scripts/lint-packaging.ts",
|
|
33
34
|
"bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/reliefweb-mcp-server.mcpb",
|
|
@@ -83,12 +84,12 @@
|
|
|
83
84
|
"access": "public"
|
|
84
85
|
},
|
|
85
86
|
"dependencies": {
|
|
86
|
-
"@cyanheads/mcp-ts-core": "^0.9.
|
|
87
|
+
"@cyanheads/mcp-ts-core": "^0.9.16",
|
|
87
88
|
"pino-pretty": "^13.1.3",
|
|
88
89
|
"zod": "^4.4.3"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
|
-
"@biomejs/biome": "^2.4.
|
|
92
|
+
"@biomejs/biome": "^2.4.16",
|
|
92
93
|
"@types/node": "^25.9.1",
|
|
93
94
|
"depcheck": "^1.4.7",
|
|
94
95
|
"ignore": "^7.0.5",
|
package/server.json
CHANGED
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/reliefweb-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.6",
|
|
10
|
+
"remotes": [
|
|
11
|
+
{
|
|
12
|
+
"type": "streamable-http",
|
|
13
|
+
"url": "https://reliefweb.caseyjhand.com/mcp"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
10
16
|
"packages": [
|
|
11
17
|
{
|
|
12
18
|
"registryType": "npm",
|
|
13
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
20
|
"identifier": "@cyanheads/reliefweb-mcp-server",
|
|
15
21
|
"runtimeHint": "bun",
|
|
16
|
-
"version": "0.1.
|
|
22
|
+
"version": "0.1.6",
|
|
17
23
|
"packageArguments": [
|
|
18
24
|
{
|
|
19
25
|
"type": "positional",
|
|
@@ -48,7 +54,7 @@
|
|
|
48
54
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
49
55
|
"identifier": "@cyanheads/reliefweb-mcp-server",
|
|
50
56
|
"runtimeHint": "bun",
|
|
51
|
-
"version": "0.1.
|
|
57
|
+
"version": "0.1.6",
|
|
52
58
|
"packageArguments": [
|
|
53
59
|
{
|
|
54
60
|
"type": "positional",
|