@cyanheads/wikidata-mcp-server 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +7 -3
- package/README.md +4 -4
- package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-entity.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-labels.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-labels.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-sitelinks.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-sitelinks.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-statements.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-statements.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/resolve-external-id.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/resolve-external-id.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts +7 -11
- package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-entities.tool.js +19 -29
- package/dist/mcp-server/tools/definitions/search-entities.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/sparql-query.tool.d.ts +4 -2
- package/dist/mcp-server/tools/definitions/sparql-query.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/sparql-query.tool.js +18 -8
- package/dist/mcp-server/tools/definitions/sparql-query.tool.js.map +1 -1
- package/package.json +7 -5
- package/server.json +3 -3
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** @cyanheads/wikidata-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.10
|
|
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
|
|
@@ -272,6 +272,7 @@ Available skills:
|
|
|
272
272
|
| `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
|
|
273
273
|
| `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
274
274
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
275
|
+
| `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
|
|
275
276
|
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
276
277
|
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
277
278
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
@@ -286,6 +287,8 @@ Available skills:
|
|
|
286
287
|
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
287
288
|
| `api-workers` | Cloudflare Workers runtime |
|
|
288
289
|
|
|
290
|
+
**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.
|
|
291
|
+
|
|
289
292
|
When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
|
|
290
293
|
|
|
291
294
|
---
|
|
@@ -302,7 +305,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
302
305
|
| `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
|
|
303
306
|
| `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. |
|
|
304
307
|
| `npm run tree` | Generate directory structure doc |
|
|
305
|
-
| `npm run format` | Auto-fix formatting |
|
|
308
|
+
| `npm run format` | Auto-fix formatting (safe fixes only) |
|
|
309
|
+
| `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
|
|
306
310
|
| `npm test` | Run tests |
|
|
307
311
|
| `npm run start:stdio` | Production mode (stdio) |
|
|
308
312
|
| `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/wikidata-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/wikidata-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -165,7 +165,7 @@ Add the following to your MCP client configuration file.
|
|
|
165
165
|
```json
|
|
166
166
|
{
|
|
167
167
|
"mcpServers": {
|
|
168
|
-
"wikidata": {
|
|
168
|
+
"wikidata-mcp-server": {
|
|
169
169
|
"type": "stdio",
|
|
170
170
|
"command": "bunx",
|
|
171
171
|
"args": ["@cyanheads/wikidata-mcp-server@latest"],
|
|
@@ -183,7 +183,7 @@ Or with npx (no Bun required):
|
|
|
183
183
|
```json
|
|
184
184
|
{
|
|
185
185
|
"mcpServers": {
|
|
186
|
-
"wikidata": {
|
|
186
|
+
"wikidata-mcp-server": {
|
|
187
187
|
"type": "stdio",
|
|
188
188
|
"command": "npx",
|
|
189
189
|
"args": ["-y", "@cyanheads/wikidata-mcp-server@latest"],
|
|
@@ -201,7 +201,7 @@ Or with Docker:
|
|
|
201
201
|
```json
|
|
202
202
|
{
|
|
203
203
|
"mcpServers": {
|
|
204
|
-
"wikidata": {
|
|
204
|
+
"wikidata-mcp-server": {
|
|
205
205
|
"type": "stdio",
|
|
206
206
|
"command": "docker",
|
|
207
207
|
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/wikidata-mcp-server:latest"]
|
|
@@ -34,5 +34,5 @@ export declare const wikidataGetEntity: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
34
34
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
35
35
|
readonly when: "ID format is not recognized as a Q-ID or P-ID.";
|
|
36
36
|
readonly recovery: "Supply a valid Q-ID (Q followed by digits, e.g. Q76) or P-ID (P followed by digits, e.g. P31).";
|
|
37
|
-
}]>;
|
|
37
|
+
}], undefined>;
|
|
38
38
|
//# sourceMappingURL=get-entity.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-entity.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-entity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-entity.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoP5B,CAAC"}
|
|
@@ -20,5 +20,5 @@ export declare const wikidataGetLabels: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
20
20
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
21
21
|
readonly when: "One or more IDs in the array are not valid Q-IDs or P-IDs.";
|
|
22
22
|
readonly recovery: "All IDs must match Q+digits or P+digits format (e.g., Q76, P31). Use wikidata_search_entities to find valid IDs.";
|
|
23
|
-
}]>;
|
|
23
|
+
}], undefined>;
|
|
24
24
|
//# sourceMappingURL=get-labels.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-labels.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-labels.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,iBAAiB;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-labels.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-labels.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,iBAAiB;;;;;;;;;;;;;;;;cA6G5B,CAAC"}
|
|
@@ -27,5 +27,5 @@ export declare const wikidataGetSitelinks: import("@cyanheads/mcp-ts-core").Tool
|
|
|
27
27
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
28
28
|
readonly when: "A P-ID was supplied — only items (Q-IDs) have sitelinks.";
|
|
29
29
|
readonly recovery: "Supply a Q-ID (Q followed by digits). Properties do not have Wikipedia sitelinks.";
|
|
30
|
-
}]>;
|
|
30
|
+
}], undefined>;
|
|
31
31
|
//# sourceMappingURL=get-sitelinks.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sitelinks.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-sitelinks.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-sitelinks.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-sitelinks.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;cAiK/B,CAAC"}
|
|
@@ -25,5 +25,5 @@ export declare const wikidataGetStatements: import("@cyanheads/mcp-ts-core").Too
|
|
|
25
25
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
26
26
|
readonly when: "ID is not a valid Q-ID or P-ID format.";
|
|
27
27
|
readonly recovery: "Supply a valid Q-ID (Q followed by digits) or P-ID (P followed by digits).";
|
|
28
|
-
}]>;
|
|
28
|
+
}], undefined>;
|
|
29
29
|
//# sourceMappingURL=get-statements.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-statements.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-statements.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-statements.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-statements.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;cAqLhC,CAAC"}
|
|
@@ -26,5 +26,5 @@ export declare const wikidataResolveExternalId: import("@cyanheads/mcp-ts-core")
|
|
|
26
26
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
27
27
|
readonly when: "Property ID is not in P+digits format.";
|
|
28
28
|
readonly recovery: "Supply a valid P-ID (P followed by digits, e.g. P356 for DOI).";
|
|
29
|
-
}]>;
|
|
29
|
+
}], undefined>;
|
|
30
30
|
//# sourceMappingURL=resolve-external-id.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-external-id.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-external-id.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0BjE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"resolve-external-id.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-external-id.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0BjE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;cAgMpC,CAAC"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/search-entities.tool
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
-
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
6
|
export declare const wikidataSearchEntities: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
7
|
query: z.ZodString;
|
|
9
8
|
type: z.ZodDefault<z.ZodEnum<{
|
|
@@ -23,14 +22,11 @@ export declare const wikidataSearchEntities: import("@cyanheads/mcp-ts-core").To
|
|
|
23
22
|
language: z.ZodString;
|
|
24
23
|
}, z.core.$strip>;
|
|
25
24
|
}, z.core.$strip>>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
readonly when: "Search query returned zero matches.";
|
|
34
|
-
readonly recovery: "Try broader terms, alternate spellings, or switch between \"item\" and \"property\" types.";
|
|
35
|
-
}]>;
|
|
25
|
+
}, z.core.$strip>, undefined, {
|
|
26
|
+
readonly effectiveQuery: z.ZodString;
|
|
27
|
+
readonly searchType: z.ZodString;
|
|
28
|
+
readonly language: z.ZodString;
|
|
29
|
+
readonly resultCount: z.ZodNumber;
|
|
30
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}>;
|
|
36
32
|
//# sourceMappingURL=search-entities.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-entities.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"search-entities.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;EAkJjC,CAAC"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/search-entities.tool
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
-
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
6
|
import { getWikidataRestService } from '../../../services/wikidata/wikidata-rest-service.js';
|
|
8
7
|
export const wikidataSearchEntities = tool('wikidata_search_entities', {
|
|
9
8
|
title: 'Search Wikidata Entities',
|
|
@@ -61,22 +60,19 @@ export const wikidataSearchEntities = tool('wikidata_search_entities', {
|
|
|
61
60
|
})
|
|
62
61
|
.describe('A single search result with entity ID, label, description, and match metadata.'))
|
|
63
62
|
.describe('Ranked list of matching entities. Empty when no results found.'),
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
}),
|
|
64
|
+
// Agent-facing search context — the query as executed, type, language, pagination counts,
|
|
65
|
+
// and recovery guidance for empty results. Reaches both structuredContent and content[].
|
|
66
|
+
enrichment: {
|
|
67
|
+
effectiveQuery: z.string().describe('The search query that was executed.'),
|
|
68
|
+
searchType: z.string().describe('The entity type that was searched ("item" or "property").'),
|
|
66
69
|
language: z.string().describe('The language used for label and description display.'),
|
|
67
|
-
|
|
70
|
+
resultCount: z.number().describe('Number of results returned on this page.'),
|
|
71
|
+
notice: z
|
|
68
72
|
.string()
|
|
69
73
|
.optional()
|
|
70
|
-
.describe('Recovery hint when results are empty — suggests how to broaden
|
|
71
|
-
}
|
|
72
|
-
errors: [
|
|
73
|
-
{
|
|
74
|
-
reason: 'no_results',
|
|
75
|
-
code: JsonRpcErrorCode.NotFound,
|
|
76
|
-
when: 'Search query returned zero matches.',
|
|
77
|
-
recovery: 'Try broader terms, alternate spellings, or switch between "item" and "property" types.',
|
|
78
|
-
},
|
|
79
|
-
],
|
|
74
|
+
.describe('Recovery hint when results are empty — echoes filters and suggests how to broaden. Absent when results are present.'),
|
|
75
|
+
},
|
|
80
76
|
async handler(input, ctx) {
|
|
81
77
|
const svc = getWikidataRestService();
|
|
82
78
|
ctx.log.info('Searching Wikidata entities', {
|
|
@@ -96,25 +92,19 @@ export const wikidataSearchEntities = tool('wikidata_search_entities', {
|
|
|
96
92
|
language: r.match?.language ?? input.language,
|
|
97
93
|
},
|
|
98
94
|
}));
|
|
95
|
+
ctx.enrich({
|
|
96
|
+
effectiveQuery: input.query,
|
|
97
|
+
searchType: input.type,
|
|
98
|
+
language: input.language,
|
|
99
|
+
resultCount: results.length,
|
|
100
|
+
});
|
|
99
101
|
if (results.length === 0) {
|
|
100
|
-
|
|
101
|
-
results: [],
|
|
102
|
-
query: input.query,
|
|
103
|
-
type: input.type,
|
|
104
|
-
language: input.language,
|
|
105
|
-
message: `No ${input.type}s matched "${input.query}" in language "${input.language}". Try broader terms or a different language code.`,
|
|
106
|
-
};
|
|
102
|
+
ctx.enrich.notice(`No ${input.type}s matched "${input.query}" in language "${input.language}". Try broader terms or a different language code.`);
|
|
107
103
|
}
|
|
108
|
-
return { results
|
|
104
|
+
return { results };
|
|
109
105
|
},
|
|
110
106
|
format: (result) => {
|
|
111
|
-
const lines = [
|
|
112
|
-
`**Query:** ${result.query} | **Type:** ${result.type} | **Language:** ${result.language}`,
|
|
113
|
-
`**Results:** ${result.results.length}`,
|
|
114
|
-
];
|
|
115
|
-
if (result.message) {
|
|
116
|
-
lines.push(`\n> ${result.message}`);
|
|
117
|
-
}
|
|
107
|
+
const lines = [`**Results:** ${result.results.length}`];
|
|
118
108
|
for (const item of result.results) {
|
|
119
109
|
lines.push('');
|
|
120
110
|
lines.push(`## ${item.label || item.id}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-entities.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"search-entities.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,yGAAyG;QACzG,yEAAyE;QACzE,+GAA+G;QAC/G,+FAA+F;IACjG,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAExD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,yEAAyE,CAAC;QACtF,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;aAC1B,OAAO,CAAC,MAAM,CAAC;aACf,QAAQ,CACP,8GAA8G,CAC/G;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CACP,qFAAqF,CACtF;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,EAAE,CAAC;aACP,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,mDAAmD,CAAC;QAChE,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,C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AAI,cAAc,KAAK,CAAC,KAAK,kBAAkB,KAAK,CAAC,QAAQ,oDAAoD,CAC9H,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa,CAAC,gBAAgB,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAElE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,IAAI,IAAI,CAAC,WAAW;gBAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -11,7 +11,6 @@ export declare const wikidataSparqlQuery: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
11
11
|
}, z.core.$strip>, z.ZodObject<{
|
|
12
12
|
results: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{}, z.core.$loose>>>;
|
|
13
13
|
variables: z.ZodArray<z.ZodString>;
|
|
14
|
-
rowCount: z.ZodNumber;
|
|
15
14
|
truncated: z.ZodBoolean;
|
|
16
15
|
}, z.core.$strip>, readonly [{
|
|
17
16
|
readonly reason: "parse_error";
|
|
@@ -30,5 +29,8 @@ export declare const wikidataSparqlQuery: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
30
29
|
readonly when: "Wikidata SPARQL endpoint is rate-limited (60 req/min, 5 concurrent per IP).";
|
|
31
30
|
readonly retryable: true;
|
|
32
31
|
readonly recovery: "Wait 30–60 seconds before retrying. Reduce concurrent queries if running parallel requests.";
|
|
33
|
-
}]
|
|
32
|
+
}], {
|
|
33
|
+
readonly totalCount: z.ZodNumber;
|
|
34
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}>;
|
|
34
36
|
//# sourceMappingURL=sparql-query.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparql-query.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/sparql-query.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":"sparql-query.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/sparql-query.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2L9B,CAAC"}
|
|
@@ -45,12 +45,20 @@ export const wikidataSparqlQuery = tool('wikidata_sparql_query', {
|
|
|
45
45
|
z.record(z.string(), z.object({}).passthrough()))
|
|
46
46
|
.describe('Array of result bindings. Each row maps variable names to binding objects with { type, value, "xml:lang"?, datatype? } fields.'),
|
|
47
47
|
variables: z.array(z.string()).describe('Variable names returned by the SELECT clause.'),
|
|
48
|
-
rowCount: z.number().describe('Number of result rows.'),
|
|
49
48
|
truncated: z
|
|
50
49
|
.boolean()
|
|
51
50
|
.describe('True when the endpoint returned a partial result set due to server-side memory limits. ' +
|
|
52
51
|
'False when the full result was returned. Add a LIMIT clause to avoid truncation on large queries.'),
|
|
53
52
|
}),
|
|
53
|
+
// Agent-facing query context — row count and empty-result guidance. Reaches both
|
|
54
|
+
// structuredContent and content[] without consuming a format() entry.
|
|
55
|
+
enrichment: {
|
|
56
|
+
totalCount: z.number().describe('Number of result rows returned.'),
|
|
57
|
+
notice: z
|
|
58
|
+
.string()
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Recovery hint when no results returned — suggests checking query logic or broadening filters. Absent on non-empty results.'),
|
|
61
|
+
},
|
|
54
62
|
errors: [
|
|
55
63
|
{
|
|
56
64
|
reason: 'parse_error',
|
|
@@ -106,23 +114,25 @@ export const wikidataSparqlQuery = tool('wikidata_sparql_query', {
|
|
|
106
114
|
}
|
|
107
115
|
const bindings = response.results.bindings;
|
|
108
116
|
const variables = response.head.vars;
|
|
117
|
+
ctx.enrich.total(bindings.length);
|
|
118
|
+
if (bindings.length === 0) {
|
|
119
|
+
ctx.enrich.notice('No results returned. Check query logic or broaden filters.');
|
|
120
|
+
}
|
|
109
121
|
return {
|
|
110
122
|
results: bindings,
|
|
111
123
|
variables,
|
|
112
|
-
rowCount: bindings.length,
|
|
113
124
|
truncated: false,
|
|
114
125
|
};
|
|
115
126
|
},
|
|
116
127
|
format: (result) => {
|
|
117
128
|
const lines = [
|
|
118
|
-
`**Variables:** ${result.variables.join(', ')} | **
|
|
129
|
+
`**Variables:** ${result.variables.join(', ')} | **Truncated:** ${result.truncated}`,
|
|
119
130
|
];
|
|
120
|
-
if (result.
|
|
121
|
-
lines.push('\n> No results returned. Check query logic or broaden filters.');
|
|
131
|
+
if (result.results.length === 0) {
|
|
122
132
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
123
133
|
}
|
|
124
134
|
// Render as a simple table (first 20 rows)
|
|
125
|
-
const cap = Math.min(result.
|
|
135
|
+
const cap = Math.min(result.results.length, 20);
|
|
126
136
|
const header = result.variables.join(' | ');
|
|
127
137
|
const separator = result.variables.map(() => '---').join(' | ');
|
|
128
138
|
lines.push('');
|
|
@@ -142,8 +152,8 @@ export const wikidataSparqlQuery = tool('wikidata_sparql_query', {
|
|
|
142
152
|
});
|
|
143
153
|
lines.push(`| ${row.join(' | ')} |`);
|
|
144
154
|
}
|
|
145
|
-
if (result.
|
|
146
|
-
lines.push(`\n… ${result.
|
|
155
|
+
if (result.results.length > 20) {
|
|
156
|
+
lines.push(`\n… ${result.results.length - 20} more rows not shown.`);
|
|
147
157
|
}
|
|
148
158
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
149
159
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparql-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/sparql-query.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,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAE1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC/D,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,oEAAoE;QACpE,mGAAmG;QACnG,0FAA0F;QAC1F,2GAA2G;QAC3G,yEAAyE;QACzE,8DAA8D;QAC9D,uFAAuF;QACvF,iEAAiE;IACnE,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAExD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,4EAA4E;YAC1E,0FAA0F;YAC1F,4EAA4E,CAC/E;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CACP,8DAA8D;YAC5D,gGAAgG,CACnG;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,EAAE,CAAC;aACP,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,+FAA+F,CAChG;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC;aACP,KAAK;QACJ,gGAAgG;QAChG,0FAA0F;QAC1F,yEAAyE;QACzE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CACjD;aACA,QAAQ,CACP,gIAAgI,CACjI;QACH,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,+CAA+C,CAAC;QACxF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sparql-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/sparql-query.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,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAE1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC/D,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,oEAAoE;QACpE,mGAAmG;QACnG,0FAA0F;QAC1F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CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnE,OAAO,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;YACzB,CAAC,CAAC,CAAC;YACH,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,uBAAuB,CAAC,CAAC;QACvE,CAAC;QAED,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/wikidata-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"mcpName": "io.github.cyanheads/wikidata-mcp-server",
|
|
5
5
|
"description": "Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers via MCP. STDIO or Streamable HTTP.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
"audit:refresh": "rm -f bun.lock && bun install && bun audit",
|
|
19
19
|
"tree": "bun run scripts/tree.ts",
|
|
20
20
|
"list-skills": "bun run scripts/list-skills.ts",
|
|
21
|
-
"format": "biome check --write
|
|
21
|
+
"format": "biome check --write .",
|
|
22
|
+
"format:unsafe": "biome check --write --unsafe .",
|
|
22
23
|
"lint:mcp": "bun run scripts/lint-mcp.ts",
|
|
23
24
|
"lint:packaging": "bun run scripts/lint-packaging.ts",
|
|
24
25
|
"bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/wikidata-mcp-server.mcpb",
|
|
25
26
|
"changelog:build": "bun run scripts/build-changelog.ts",
|
|
26
27
|
"changelog:check": "bun run scripts/build-changelog.ts --check",
|
|
28
|
+
"release:github": "bun run scripts/release-github.ts",
|
|
27
29
|
"test": "bunx vitest run",
|
|
28
30
|
"start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
|
|
29
31
|
"start:http": "MCP_TRANSPORT_TYPE=http bun ./dist/index.js",
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
"access": "public"
|
|
74
76
|
},
|
|
75
77
|
"dependencies": {
|
|
76
|
-
"@cyanheads/mcp-ts-core": "^0.9.
|
|
78
|
+
"@cyanheads/mcp-ts-core": "^0.9.21",
|
|
77
79
|
"pino-pretty": "^13.1.3",
|
|
78
80
|
"zod": "^4.4.3"
|
|
79
81
|
},
|
|
@@ -83,8 +85,8 @@
|
|
|
83
85
|
"depcheck": "^1.4.7",
|
|
84
86
|
"ignore": "^7.0.5",
|
|
85
87
|
"tsc-alias": "^1.8.17",
|
|
86
|
-
"tsx": "^4.22.
|
|
88
|
+
"tsx": "^4.22.4",
|
|
87
89
|
"typescript": "^6.0.3",
|
|
88
|
-
"vitest": "^4.1.
|
|
90
|
+
"vitest": "^4.1.8"
|
|
89
91
|
}
|
|
90
92
|
}
|
package/server.json
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"url": "https://wikidata.caseyjhand.com/mcp"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
-
"version": "0.1.
|
|
15
|
+
"version": "0.1.10",
|
|
16
16
|
"packages": [
|
|
17
17
|
{
|
|
18
18
|
"registryType": "npm",
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/wikidata-mcp-server",
|
|
21
21
|
"runtimeHint": "bun",
|
|
22
|
-
"version": "0.1.
|
|
22
|
+
"version": "0.1.10",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{
|
|
25
25
|
"type": "positional",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
70
70
|
"identifier": "@cyanheads/wikidata-mcp-server",
|
|
71
71
|
"runtimeHint": "bun",
|
|
72
|
-
"version": "0.1.
|
|
72
|
+
"version": "0.1.10",
|
|
73
73
|
"packageArguments": [
|
|
74
74
|
{
|
|
75
75
|
"type": "positional",
|