@cyanheads/wikipedia-mcp-server 0.1.5 → 0.1.7
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 +12 -3
- package/CLAUDE.md +12 -3
- package/README.md +7 -7
- package/changelog/0.1.x/0.1.6.md +18 -0
- package/changelog/0.1.x/0.1.7.md +22 -0
- package/changelog/template.md +1 -1
- package/dist/config/server-config.js +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +16 -22
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-article.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-article.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-languages.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-languages.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-sections.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-sections.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-summary.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-get-summary.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-search-nearby.tool.d.ts +7 -10
- package/dist/mcp-server/tools/definitions/wikipedia-search-nearby.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-search-nearby.tool.js +21 -29
- package/dist/mcp-server/tools/definitions/wikipedia-search-nearby.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-search.tool.d.ts +5 -8
- package/dist/mcp-server/tools/definitions/wikipedia-search.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/wikipedia-search.tool.js +15 -22
- package/dist/mcp-server/tools/definitions/wikipedia-search.tool.js.map +1 -1
- package/package.json +7 -4
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** wikipedia-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.7
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.21`
|
|
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
|
|
@@ -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
|
|
@@ -276,10 +280,14 @@ Available skills:
|
|
|
276
280
|
| `api-testing` | createMockContext, test patterns |
|
|
277
281
|
| `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
|
|
278
282
|
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
283
|
+
| `api-mirror` | MirrorService: persistent, self-refreshing local SQLite mirror of a bulk upstream dataset |
|
|
279
284
|
| `api-workers` | Cloudflare Workers runtime |
|
|
285
|
+
| `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
|
|
280
286
|
|
|
281
287
|
When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
|
|
282
288
|
|
|
289
|
+
**Chaining skills into pipelines.** When the user wants a multi-phase effort — build this server out, QA-and-fix the surface, update-and-ship — *and you can spawn sub-agents*, `skills/orchestrations/SKILL.md` sequences the task skills above into a gated pipeline with verification at each step. Read it to drive the run. Optional: skip it if you can't orchestrate sub-agents, and ignore it entirely if you were *spawned* as one — you've already been scoped to a single phase.
|
|
290
|
+
|
|
283
291
|
---
|
|
284
292
|
|
|
285
293
|
## Commands
|
|
@@ -294,7 +302,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
294
302
|
| `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
|
|
295
303
|
| `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
|
|
296
304
|
| `npm run tree` | Generate directory structure doc |
|
|
297
|
-
| `npm run format` | Auto-fix formatting |
|
|
305
|
+
| `npm run format` | Auto-fix formatting (safe fixes only) |
|
|
306
|
+
| `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
|
|
298
307
|
| `npm test` | Run tests |
|
|
299
308
|
| `npm run start:stdio` | Production mode (stdio) |
|
|
300
309
|
| `npm run start:http` | Production mode (HTTP) |
|
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** wikipedia-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.7
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.21`
|
|
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
|
|
@@ -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
|
|
@@ -276,10 +280,14 @@ Available skills:
|
|
|
276
280
|
| `api-testing` | createMockContext, test patterns |
|
|
277
281
|
| `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
|
|
278
282
|
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
283
|
+
| `api-mirror` | MirrorService: persistent, self-refreshing local SQLite mirror of a bulk upstream dataset |
|
|
279
284
|
| `api-workers` | Cloudflare Workers runtime |
|
|
285
|
+
| `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
|
|
280
286
|
|
|
281
287
|
When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
|
|
282
288
|
|
|
289
|
+
**Chaining skills into pipelines.** When the user wants a multi-phase effort — build this server out, QA-and-fix the surface, update-and-ship — *and you can spawn sub-agents*, `skills/orchestrations/SKILL.md` sequences the task skills above into a gated pipeline with verification at each step. Read it to drive the run. Optional: skip it if you can't orchestrate sub-agents, and ignore it entirely if you were *spawned* as one — you've already been scoped to a single phase.
|
|
290
|
+
|
|
283
291
|
---
|
|
284
292
|
|
|
285
293
|
## Commands
|
|
@@ -294,7 +302,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
294
302
|
| `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
|
|
295
303
|
| `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
|
|
296
304
|
| `npm run tree` | Generate directory structure doc |
|
|
297
|
-
| `npm run format` | Auto-fix formatting |
|
|
305
|
+
| `npm run format` | Auto-fix formatting (safe fixes only) |
|
|
306
|
+
| `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
|
|
298
307
|
| `npm test` | Run tests |
|
|
299
308
|
| `npm run start:stdio` | Production mode (stdio) |
|
|
300
309
|
| `npm run start:http` | Production mode (HTTP) |
|
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/wikipedia-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/wikipedia-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -125,10 +125,10 @@ Add the following to your MCP client configuration file.
|
|
|
125
125
|
```json
|
|
126
126
|
{
|
|
127
127
|
"mcpServers": {
|
|
128
|
-
"wikipedia": {
|
|
128
|
+
"wikipedia-mcp-server": {
|
|
129
129
|
"type": "stdio",
|
|
130
130
|
"command": "bunx",
|
|
131
|
-
"args": ["wikipedia-mcp-server@latest"],
|
|
131
|
+
"args": ["@cyanheads/wikipedia-mcp-server@latest"],
|
|
132
132
|
"env": {
|
|
133
133
|
"MCP_TRANSPORT_TYPE": "stdio",
|
|
134
134
|
"MCP_LOG_LEVEL": "info"
|
|
@@ -143,10 +143,10 @@ Or with npx (no Bun required):
|
|
|
143
143
|
```json
|
|
144
144
|
{
|
|
145
145
|
"mcpServers": {
|
|
146
|
-
"wikipedia": {
|
|
146
|
+
"wikipedia-mcp-server": {
|
|
147
147
|
"type": "stdio",
|
|
148
148
|
"command": "npx",
|
|
149
|
-
"args": ["-y", "wikipedia-mcp-server@latest"],
|
|
149
|
+
"args": ["-y", "@cyanheads/wikipedia-mcp-server@latest"],
|
|
150
150
|
"env": {
|
|
151
151
|
"MCP_TRANSPORT_TYPE": "stdio",
|
|
152
152
|
"MCP_LOG_LEVEL": "info"
|
|
@@ -161,7 +161,7 @@ Or with Docker:
|
|
|
161
161
|
```json
|
|
162
162
|
{
|
|
163
163
|
"mcpServers": {
|
|
164
|
-
"wikipedia": {
|
|
164
|
+
"wikipedia-mcp-server": {
|
|
165
165
|
"type": "stdio",
|
|
166
166
|
"command": "docker",
|
|
167
167
|
"args": [
|
|
@@ -217,7 +217,7 @@ cp .env.example .env
|
|
|
217
217
|
|
|
218
218
|
| Variable | Description | Default |
|
|
219
219
|
|:---------|:------------|:--------|
|
|
220
|
-
| `WIKIPEDIA_USER_AGENT` | User-Agent header sent with every Wikimedia API request. Customize for your deployment. | `wikipedia-mcp-server/0.1.
|
|
220
|
+
| `WIKIPEDIA_USER_AGENT` | User-Agent header sent with every Wikimedia API request. Customize for your deployment. | `wikipedia-mcp-server/0.1.7 (https://github.com/cyanheads/wikipedia-mcp-server)` |
|
|
221
221
|
| `WIKIPEDIA_BASE_URL` | Base Wikipedia URL. Language selection is per-call — not a global language setting. | `https://en.wikipedia.org` |
|
|
222
222
|
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
223
223
|
| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "enrichment on wikipedia_search and wikipedia_search_nearby: query/filter echoes, result totals, and empty-result guidance in a typed enrichment block reaching both structuredContent and content[]; mcp-ts-core ^0.9.13 → ^0.9.16"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.6 — 2026-05-30
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **`wikipedia_search`** — agent-facing enrichment block added: `effectiveQuery` echoes the query sent, `totalCount` reports total matching results in Wikipedia, `notice` surfaces empty-result guidance when no articles matched. `total_results` and `query_used` removed from `output` (values now in `enrichment`). Empty-result condition no longer throws; handler returns with enrichment notice instead.
|
|
12
|
+
- **`wikipedia_search_nearby`** — agent-facing enrichment block added: `queryLatitude`, `queryLongitude`, `radiusMetersUsed` echo search parameters, `totalResults` reports the result count, `notice` surfaces guidance when no geotagged articles were found. `total_results`, `query_latitude`, `query_longitude`, `radius_meters_used` removed from `output` (values now in `enrichment` under camelCase keys). Empty-result condition no longer throws.
|
|
13
|
+
- **`@cyanheads/mcp-ts-core`** `^0.9.13 → ^0.9.16`
|
|
14
|
+
|
|
15
|
+
## structuredContent
|
|
16
|
+
|
|
17
|
+
- `wikipedia_search`: `total_results` → `enrichment.totalCount`, `query_used` → `enrichment.effectiveQuery` (values preserved in both channels; keys renamed)
|
|
18
|
+
- `wikipedia_search_nearby`: `total_results` → `enrichment.totalResults`, `query_latitude` → `enrichment.queryLatitude`, `query_longitude` → `enrichment.queryLongitude`, `radius_meters_used` → `enrichment.radiusMetersUsed` (values preserved in both channels; keys renamed and moved to enrichment)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "mcp-ts-core ^0.9.16 → ^0.9.21: per-request log context fix, fetchWithTimeout secret-stripping, withRetry fail-fast on non-retryable errors; skill sync (api-mirror, orchestrations, 8 updated); release:github script; README client-config key renamed to package name"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.7 — 2026-06-02
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **`@cyanheads/mcp-ts-core`** `^0.9.16 → ^0.9.21` — picks up three framework fixes:
|
|
12
|
+
- HTTP transport per-request log context: per-request logs and traces now carry fresh request + trace/span IDs instead of the frozen boot context.
|
|
13
|
+
- `fetchWithTimeout` strips query-string secrets (e.g. `?api_key=`) from error messages and logs.
|
|
14
|
+
- `withRetry` fails fast on non-retryable errors; `ctx.fail` auto-populates the `retryable` flag.
|
|
15
|
+
- **README client-config** — server key in install snippets renamed from `wikipedia` to `wikipedia-mcp-server`; `bunx`/`npx` args updated to the scoped package name `@cyanheads/wikipedia-mcp-server`.
|
|
16
|
+
- **Skills synced** — `api-context`, `api-linter`, `api-utils`, `api-canvas`, `add-tool`, `add-service`, `design-mcp-server`, `release-and-publish` updated from framework `0.9.21`; `api-mirror` and `orchestrations` added.
|
|
17
|
+
- **`scripts/release-github.ts`** added — `release:github` script for one-command GitHub Release creation.
|
|
18
|
+
|
|
19
|
+
## Dependencies
|
|
20
|
+
|
|
21
|
+
- `@cyanheads/mcp-ts-core` `^0.9.16 → ^0.9.21`
|
|
22
|
+
- `vitest` `^4.1.7 → ^4.1.8`
|
package/changelog/template.md
CHANGED
|
@@ -43,7 +43,7 @@ security: false
|
|
|
43
43
|
name the symbol, state what changed, stop. Use a second sentence only when
|
|
44
44
|
it carries weight. If a bullet feels long, it is.
|
|
45
45
|
|
|
46
|
-
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
|
|
47
47
|
relevant skill), ceremonial framings ("This release introduces…",
|
|
48
48
|
backwards-compat paragraphs), file-by-file test enumerations, internal
|
|
49
49
|
implementation notes. Prefer code/symbol names over English re-explanations.
|
|
@@ -11,7 +11,7 @@ const ServerConfigSchema = z.object({
|
|
|
11
11
|
.describe('Base Wikipedia URL — language selection is per-call, not global'),
|
|
12
12
|
userAgent: z
|
|
13
13
|
.string()
|
|
14
|
-
.default('wikipedia-mcp-server/0.1.
|
|
14
|
+
.default('wikipedia-mcp-server/0.1.6 (https://github.com/cyanheads/wikipedia-mcp-server)')
|
|
15
15
|
.describe('User-Agent header sent with every request per Wikimedia policy'),
|
|
16
16
|
});
|
|
17
17
|
let _config;
|
|
@@ -28,7 +28,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
28
28
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
29
29
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
30
30
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
31
|
-
}]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
31
|
+
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
32
32
|
title: import("zod").ZodString;
|
|
33
33
|
language: import("zod").ZodDefault<import("zod").ZodString>;
|
|
34
34
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -55,7 +55,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
55
55
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
56
56
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
57
57
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
58
|
-
}]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
58
|
+
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
59
59
|
title: import("zod").ZodString;
|
|
60
60
|
language: import("zod").ZodDefault<import("zod").ZodString>;
|
|
61
61
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -84,7 +84,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
84
84
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
85
85
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
86
86
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
87
|
-
}]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
87
|
+
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
88
88
|
title: import("zod").ZodString;
|
|
89
89
|
language: import("zod").ZodDefault<import("zod").ZodString>;
|
|
90
90
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -106,7 +106,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
106
106
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
107
107
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
108
108
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
109
|
-
}]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
109
|
+
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
110
110
|
query: import("zod").ZodString;
|
|
111
111
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
112
112
|
language: import("zod").ZodDefault<import("zod").ZodString>;
|
|
@@ -117,20 +117,17 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
117
117
|
snippet: import("zod").ZodString;
|
|
118
118
|
wordcount: import("zod").ZodNumber;
|
|
119
119
|
}, import("zod/v4/core").$strip>>;
|
|
120
|
-
total_results: import("zod").ZodNumber;
|
|
121
|
-
query_used: import("zod").ZodString;
|
|
122
120
|
language: import("zod").ZodString;
|
|
123
121
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
124
|
-
readonly reason: "no_results";
|
|
125
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
126
|
-
readonly when: "Search returned zero results for the query.";
|
|
127
|
-
readonly recovery: "Broaden the query or try different keywords and search again.";
|
|
128
|
-
}, {
|
|
129
122
|
readonly reason: "invalid_language";
|
|
130
123
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
131
124
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
132
125
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
133
|
-
}]
|
|
126
|
+
}], {
|
|
127
|
+
readonly effectiveQuery: import("zod").ZodString;
|
|
128
|
+
readonly totalCount: import("zod").ZodNumber;
|
|
129
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
+
}> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
134
131
|
latitude: import("zod").ZodNumber;
|
|
135
132
|
longitude: import("zod").ZodNumber;
|
|
136
133
|
radius_meters: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
@@ -144,17 +141,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
144
141
|
longitude: import("zod").ZodNumber;
|
|
145
142
|
distance_meters: import("zod").ZodNumber;
|
|
146
143
|
}, import("zod/v4/core").$strip>>;
|
|
147
|
-
total_results: import("zod").ZodNumber;
|
|
148
|
-
query_latitude: import("zod").ZodNumber;
|
|
149
|
-
query_longitude: import("zod").ZodNumber;
|
|
150
|
-
radius_meters_used: import("zod").ZodNumber;
|
|
151
144
|
language: import("zod").ZodString;
|
|
152
145
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
153
|
-
readonly reason: "no_results";
|
|
154
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
155
|
-
readonly when: "No geotagged articles found within the search radius.";
|
|
156
|
-
readonly recovery: "Increase radius_meters or verify the coordinates are correct and retry.";
|
|
157
|
-
}, {
|
|
158
146
|
readonly reason: "invalid_coordinates";
|
|
159
147
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
160
148
|
readonly when: "Latitude or longitude is outside valid WGS 84 range.";
|
|
@@ -164,5 +152,11 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
164
152
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
165
153
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
166
154
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
167
|
-
}]
|
|
155
|
+
}], {
|
|
156
|
+
readonly queryLatitude: import("zod").ZodNumber;
|
|
157
|
+
readonly queryLongitude: import("zod").ZodNumber;
|
|
158
|
+
readonly radiusMetersUsed: import("zod").ZodNumber;
|
|
159
|
+
readonly totalResults: import("zod").ZodNumber;
|
|
160
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
161
|
+
}>)[];
|
|
168
162
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAO9B,CAAC"}
|
|
@@ -30,5 +30,5 @@ export declare const wikipediaGetArticle: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
30
30
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
31
31
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
32
32
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
33
|
-
}]>;
|
|
33
|
+
}], undefined>;
|
|
34
34
|
//# sourceMappingURL=wikipedia-get-article.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-get-article.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-article.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"wikipedia-get-article.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-article.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;cAkK9B,CAAC"}
|
|
@@ -31,5 +31,5 @@ export declare const wikipediaGetLanguages: import("@cyanheads/mcp-ts-core").Too
|
|
|
31
31
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
32
32
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
33
33
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
34
|
-
}]>;
|
|
34
|
+
}], undefined>;
|
|
35
35
|
//# sourceMappingURL=wikipedia-get-languages.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-get-languages.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-languages.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"wikipedia-get-languages.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-languages.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqHhC,CAAC"}
|
|
@@ -33,5 +33,5 @@ export declare const wikipediaGetSections: import("@cyanheads/mcp-ts-core").Tool
|
|
|
33
33
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
34
34
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
35
35
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
36
|
-
}]>;
|
|
36
|
+
}], undefined>;
|
|
37
37
|
//# sourceMappingURL=wikipedia-get-sections.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-get-sections.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-sections.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"wikipedia-get-sections.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-sections.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuH/B,CAAC"}
|
|
@@ -26,5 +26,5 @@ export declare const wikipediaGetSummary: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
26
26
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
27
27
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
28
28
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
29
|
-
}]>;
|
|
29
|
+
}], undefined>;
|
|
30
30
|
//# sourceMappingURL=wikipedia-get-summary.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-get-summary.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-summary.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"wikipedia-get-summary.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-get-summary.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;cA8G9B,CAAC"}
|
|
@@ -18,17 +18,8 @@ export declare const wikipediaSearchNearby: import("@cyanheads/mcp-ts-core").Too
|
|
|
18
18
|
longitude: z.ZodNumber;
|
|
19
19
|
distance_meters: z.ZodNumber;
|
|
20
20
|
}, z.core.$strip>>;
|
|
21
|
-
total_results: z.ZodNumber;
|
|
22
|
-
query_latitude: z.ZodNumber;
|
|
23
|
-
query_longitude: z.ZodNumber;
|
|
24
|
-
radius_meters_used: z.ZodNumber;
|
|
25
21
|
language: z.ZodString;
|
|
26
22
|
}, z.core.$strip>, readonly [{
|
|
27
|
-
readonly reason: "no_results";
|
|
28
|
-
readonly code: JsonRpcErrorCode.NotFound;
|
|
29
|
-
readonly when: "No geotagged articles found within the search radius.";
|
|
30
|
-
readonly recovery: "Increase radius_meters or verify the coordinates are correct and retry.";
|
|
31
|
-
}, {
|
|
32
23
|
readonly reason: "invalid_coordinates";
|
|
33
24
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
34
25
|
readonly when: "Latitude or longitude is outside valid WGS 84 range.";
|
|
@@ -38,5 +29,11 @@ export declare const wikipediaSearchNearby: import("@cyanheads/mcp-ts-core").Too
|
|
|
38
29
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
39
30
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
40
31
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
41
|
-
}]
|
|
32
|
+
}], {
|
|
33
|
+
readonly queryLatitude: z.ZodNumber;
|
|
34
|
+
readonly queryLongitude: z.ZodNumber;
|
|
35
|
+
readonly radiusMetersUsed: z.ZodNumber;
|
|
36
|
+
readonly totalResults: z.ZodNumber;
|
|
37
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}>;
|
|
42
39
|
//# sourceMappingURL=wikipedia-search-nearby.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-search-nearby.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search-nearby.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,qBAAqB
|
|
1
|
+
{"version":3,"file":"wikipedia-search-nearby.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search-nearby.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,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwJhC,CAAC"}
|
|
@@ -41,19 +41,21 @@ export const wikipediaSearchNearby = tool('wikipedia_search_nearby', {
|
|
|
41
41
|
})
|
|
42
42
|
.describe('A single geotagged article result.'))
|
|
43
43
|
.describe('Geotagged articles sorted ascending by distance_meters.'),
|
|
44
|
-
total_results: z.number().describe('Number of results returned.'),
|
|
45
|
-
query_latitude: z.number().describe('Latitude used for the search.'),
|
|
46
|
-
query_longitude: z.number().describe('Longitude used for the search.'),
|
|
47
|
-
radius_meters_used: z.number().describe('Radius in meters used for the search.'),
|
|
48
44
|
language: z.string().describe('Language edition queried.'),
|
|
49
45
|
}),
|
|
46
|
+
// Agent-facing context — echoes the search parameters and total match count, plus
|
|
47
|
+
// an optional notice when nothing matched. Reaches both structuredContent and content[].
|
|
48
|
+
enrichment: {
|
|
49
|
+
queryLatitude: z.number().describe('Latitude used for the search.'),
|
|
50
|
+
queryLongitude: z.number().describe('Longitude used for the search.'),
|
|
51
|
+
radiusMetersUsed: z.number().describe('Radius in meters used for the search.'),
|
|
52
|
+
totalResults: z.number().describe('Number of results returned.'),
|
|
53
|
+
notice: z
|
|
54
|
+
.string()
|
|
55
|
+
.optional()
|
|
56
|
+
.describe('Guidance when no geotagged articles were found — e.g. increase radius. Absent when results are returned.'),
|
|
57
|
+
},
|
|
50
58
|
errors: [
|
|
51
|
-
{
|
|
52
|
-
reason: 'no_results',
|
|
53
|
-
code: JsonRpcErrorCode.NotFound,
|
|
54
|
-
when: 'No geotagged articles found within the search radius.',
|
|
55
|
-
recovery: 'Increase radius_meters or verify the coordinates are correct and retry.',
|
|
56
|
-
},
|
|
57
59
|
{
|
|
58
60
|
reason: 'invalid_coordinates',
|
|
59
61
|
code: JsonRpcErrorCode.ValidationError,
|
|
@@ -93,30 +95,20 @@ export const wikipediaSearchNearby = tool('wikipedia_search_nearby', {
|
|
|
93
95
|
});
|
|
94
96
|
const svc = getWikipediaService();
|
|
95
97
|
const { results } = await svc.searchNearby(input.latitude, input.longitude, radiusMeters, limit, language, ctx);
|
|
98
|
+
ctx.enrich({
|
|
99
|
+
queryLatitude: input.latitude,
|
|
100
|
+
queryLongitude: input.longitude,
|
|
101
|
+
radiusMetersUsed: radiusMeters,
|
|
102
|
+
totalResults: results.length,
|
|
103
|
+
});
|
|
96
104
|
if (results.length === 0) {
|
|
97
|
-
|
|
98
|
-
latitude: input.latitude,
|
|
99
|
-
longitude: input.longitude,
|
|
100
|
-
radiusMeters,
|
|
101
|
-
recovery: {
|
|
102
|
-
hint: `Increase radius_meters beyond ${radiusMeters} or verify the coordinates are correct.`,
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
+
ctx.enrich.notice(`No geotagged Wikipedia articles found within ${radiusMeters}m of (${input.latitude}, ${input.longitude}). Try increasing radius_meters or verify the coordinates are correct.`);
|
|
105
106
|
}
|
|
106
107
|
ctx.log.info('Geo search complete', { count: results.length, language });
|
|
107
|
-
return {
|
|
108
|
-
results,
|
|
109
|
-
total_results: results.length,
|
|
110
|
-
query_latitude: input.latitude,
|
|
111
|
-
query_longitude: input.longitude,
|
|
112
|
-
radius_meters_used: radiusMeters,
|
|
113
|
-
language,
|
|
114
|
-
};
|
|
108
|
+
return { results, language };
|
|
115
109
|
},
|
|
116
110
|
format: (result) => {
|
|
117
|
-
const lines = [
|
|
118
|
-
`**${result.total_results} articles** near (${result.query_latitude}, ${result.query_longitude}) within ${result.radius_meters_used}m (${result.language})\n`,
|
|
119
|
-
];
|
|
111
|
+
const lines = [`**${result.results.length} articles** (${result.language})\n`];
|
|
120
112
|
for (const item of result.results) {
|
|
121
113
|
lines.push(`### ${item.title}`);
|
|
122
114
|
lines.push(`**Page ID:** ${item.pageid} | **Distance:** ${item.distance_meters}m | **Coords:** (${item.latitude}, ${item.longitude})`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-search-nearby.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search-nearby.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,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IACnE,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,qXAAqX;IACvX,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;QACvF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;QAC3F,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CAAC,gFAAgF,CAAC;QAC7F,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,uFAAuF,CACxF;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CAAC,6EAA6E,CAAC;KAC3F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC;aACP,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;YAClE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;YAC/E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;YAC7E,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;YAC/E,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;SACtF,CAAC;aACD,QAAQ,CAAC,oCAAoC,CAAC,CAClD;aACA,QAAQ,CAAC,yDAAyD,CAAC;QACtE,
|
|
1
|
+
{"version":3,"file":"wikipedia-search-nearby.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search-nearby.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,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,qBA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olDefin
|
|
|
15
15
|
snippet: z.ZodString;
|
|
16
16
|
wordcount: z.ZodNumber;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
|
-
total_results: z.ZodNumber;
|
|
19
|
-
query_used: z.ZodString;
|
|
20
18
|
language: z.ZodString;
|
|
21
19
|
}, z.core.$strip>, readonly [{
|
|
22
|
-
readonly reason: "no_results";
|
|
23
|
-
readonly code: JsonRpcErrorCode.NotFound;
|
|
24
|
-
readonly when: "Search returned zero results for the query.";
|
|
25
|
-
readonly recovery: "Broaden the query or try different keywords and search again.";
|
|
26
|
-
}, {
|
|
27
20
|
readonly reason: "invalid_language";
|
|
28
21
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
29
22
|
readonly when: "The language code is not a valid BCP 47 code.";
|
|
30
23
|
readonly recovery: "Use a valid BCP 47 language code such as \"fr\", \"de\", or \"ja\".";
|
|
31
|
-
}]
|
|
24
|
+
}], {
|
|
25
|
+
readonly effectiveQuery: z.ZodString;
|
|
26
|
+
readonly totalCount: z.ZodNumber;
|
|
27
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}>;
|
|
32
29
|
//# sourceMappingURL=wikipedia-search.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-search.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search.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,eAAe
|
|
1
|
+
{"version":3,"file":"wikipedia-search.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search.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,eAAe;;;;;;;;;;;;;;;;;;;;;EAkG1B,CAAC"}
|
|
@@ -33,17 +33,19 @@ export const wikipediaSearch = tool('wikipedia_search', {
|
|
|
33
33
|
})
|
|
34
34
|
.describe('A single search result entry.'))
|
|
35
35
|
.describe('Ranked search results.'),
|
|
36
|
-
total_results: z.number().describe('Total number of matching results in Wikipedia.'),
|
|
37
|
-
query_used: z.string().describe('The query that was searched.'),
|
|
38
36
|
language: z.string().describe('Language edition queried.'),
|
|
39
37
|
}),
|
|
38
|
+
// Agent-facing context — query echo, total match count, and optional empty-result
|
|
39
|
+
// notice. Reaches structuredContent AND content[] automatically; disjoint from output.
|
|
40
|
+
enrichment: {
|
|
41
|
+
effectiveQuery: z.string().describe('The query sent to Wikipedia.'),
|
|
42
|
+
totalCount: z.number().describe('Total matching results in Wikipedia.'),
|
|
43
|
+
notice: z
|
|
44
|
+
.string()
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Guidance when no results matched — e.g. try different keywords. Absent on successful result pages.'),
|
|
47
|
+
},
|
|
40
48
|
errors: [
|
|
41
|
-
{
|
|
42
|
-
reason: 'no_results',
|
|
43
|
-
code: JsonRpcErrorCode.NotFound,
|
|
44
|
-
when: 'Search returned zero results for the query.',
|
|
45
|
-
recovery: 'Broaden the query or try different keywords and search again.',
|
|
46
|
-
},
|
|
47
49
|
{
|
|
48
50
|
reason: 'invalid_language',
|
|
49
51
|
code: JsonRpcErrorCode.ValidationError,
|
|
@@ -60,25 +62,16 @@ export const wikipediaSearch = tool('wikipedia_search', {
|
|
|
60
62
|
ctx.log.info('Searching Wikipedia', { query: input.query, limit, language });
|
|
61
63
|
const svc = getWikipediaService();
|
|
62
64
|
const { results, totalResults } = await svc.search(input.query, limit, language, ctx);
|
|
65
|
+
ctx.enrich.echo(input.query);
|
|
66
|
+
ctx.enrich.total(totalResults);
|
|
63
67
|
if (results.length === 0) {
|
|
64
|
-
|
|
65
|
-
query: input.query,
|
|
66
|
-
language,
|
|
67
|
-
recovery: { hint: `Try different keywords or a broader query than "${input.query}".` },
|
|
68
|
-
});
|
|
68
|
+
ctx.enrich.notice(`No Wikipedia articles found for "${input.query}" in language "${language}". Try different keywords or a broader query.`);
|
|
69
69
|
}
|
|
70
70
|
ctx.log.info('Search complete', { count: results.length, totalResults, language });
|
|
71
|
-
return {
|
|
72
|
-
results,
|
|
73
|
-
total_results: totalResults,
|
|
74
|
-
query_used: input.query,
|
|
75
|
-
language,
|
|
76
|
-
};
|
|
71
|
+
return { results, language };
|
|
77
72
|
},
|
|
78
73
|
format: (result) => {
|
|
79
|
-
const lines = [
|
|
80
|
-
`**${result.results.length} of ${result.total_results} results** for "${result.query_used}" (${result.language})\n`,
|
|
81
|
-
];
|
|
74
|
+
const lines = [`**${result.results.length} results** (${result.language})\n`];
|
|
82
75
|
for (const item of result.results) {
|
|
83
76
|
lines.push(`### ${item.title}`);
|
|
84
77
|
lines.push(`**Page ID:** ${item.pageid} | **Words:** ${item.wordcount}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wikipedia-search.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search.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,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE;IACtD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,gVAAgV;IAClV,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QAChF,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,uFAAuF,CACxF;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CAAC,6EAA6E,CAAC;KAC3F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC;aACP,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;YACnF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;YAC/E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;YAC7E,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;SACtD,CAAC;aACD,QAAQ,CAAC,+BAA+B,CAAC,CAC7C;aACA,QAAQ,CAAC,wBAAwB,CAAC;QACrC,
|
|
1
|
+
{"version":3,"file":"wikipedia-search.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/wikipedia-search.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,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE;IACtD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,gVAAgV;IAClV,WAAW,EAAE,EAAE,YAAY,EA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kBAAkB,QAAQ,+CAA+C,CACzH,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEnF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa,CAAC,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,eAAe,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC;QACxF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,MAAM,iBAAiB,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;YACzE,IAAI,IAAI,CAAC,OAAO;gBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7C,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/wikipedia-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Search Wikipedia articles, read summaries and full text, target sections, find nearby pages, and list language editions via MCP. STDIO or Streamable HTTP.",
|
|
5
5
|
"mcpName": "io.github.cyanheads/wikipedia-mcp-server",
|
|
6
6
|
"type": "module",
|
|
@@ -27,13 +27,16 @@
|
|
|
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/wikipedia-mcp-server.mcpb",
|
|
34
35
|
"changelog:build": "bun run scripts/build-changelog.ts",
|
|
35
36
|
"changelog:check": "bun run scripts/build-changelog.ts --check",
|
|
36
37
|
"test": "bunx vitest run",
|
|
38
|
+
"release:github": "bun run scripts/release-github.ts",
|
|
39
|
+
"publish-mcp": "mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish",
|
|
37
40
|
"start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
|
|
38
41
|
"start:http": "MCP_TRANSPORT_TYPE=http bun ./dist/index.js"
|
|
39
42
|
},
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
"access": "public"
|
|
78
81
|
},
|
|
79
82
|
"dependencies": {
|
|
80
|
-
"@cyanheads/mcp-ts-core": "^0.9.
|
|
83
|
+
"@cyanheads/mcp-ts-core": "^0.9.21",
|
|
81
84
|
"pino-pretty": "^13.1.3",
|
|
82
85
|
"wtf_wikipedia": "^10.4.2",
|
|
83
86
|
"zod": "^4.4.3"
|
|
@@ -89,6 +92,6 @@
|
|
|
89
92
|
"ignore": "^7.0.5",
|
|
90
93
|
"tsc-alias": "^1.8.17",
|
|
91
94
|
"typescript": "^6.0.3",
|
|
92
|
-
"vitest": "^4.1.
|
|
95
|
+
"vitest": "^4.1.8"
|
|
93
96
|
}
|
|
94
97
|
}
|
package/server.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/wikipedia-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.7",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "@cyanheads/wikipedia-mcp-server",
|
|
15
15
|
"runtimeHint": "bun",
|
|
16
|
-
"version": "0.1.
|
|
16
|
+
"version": "0.1.7",
|
|
17
17
|
"packageArguments": [
|
|
18
18
|
{
|
|
19
19
|
"type": "positional",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
43
43
|
"identifier": "@cyanheads/wikipedia-mcp-server",
|
|
44
44
|
"runtimeHint": "bun",
|
|
45
|
-
"version": "0.1.
|
|
45
|
+
"version": "0.1.7",
|
|
46
46
|
"packageArguments": [
|
|
47
47
|
{
|
|
48
48
|
"type": "positional",
|