@xiedada/nodemw-mcp-server 0.0.9 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -52
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
37
37
  // package.json
38
38
  var package_default = {
39
39
  name: "@xiedada/nodemw-mcp-server",
40
- version: "0.0.9",
40
+ version: "0.0.12",
41
41
  description: "MCP server for nodemw - MediaWiki API client",
42
42
  type: "module",
43
43
  main: "dist/index.js",
@@ -301,7 +301,7 @@ async function handleGetArticleTool(title, followRedirect, redirectInfo, revisio
301
301
  });
302
302
  const pages = info.pages;
303
303
  const page = getFirstItem(pages);
304
- if (!page || page.missing) {
304
+ if (!page || page.missing !== void 0) {
305
305
  return {
306
306
  content: [{ type: "text", text: `Page "${title}" not found.` }],
307
307
  isError: true
@@ -923,17 +923,7 @@ function whoamiTool(server) {
923
923
  },
924
924
  async () => handleWhoamiTool()
925
925
  );
926
- tool.update({ outputSchema: { user: z15.object({
927
- name: z15.string(),
928
- id: z15.number(),
929
- groups: z15.array(z15.string()),
930
- rights: z15.array(z15.string()),
931
- ratelimits: z15.union([z15.record(z15.unknown()), z15.array(z15.unknown())]),
932
- editcount: z15.number(),
933
- realname: z15.string(),
934
- email: z15.string(),
935
- emailauthenticated: z15.string()
936
- }) } });
926
+ tool.update({ outputSchema: { user: z15.record(z15.unknown()) } });
937
927
  return tool;
938
928
  }
939
929
  async function handleWhoamiTool() {
@@ -965,18 +955,7 @@ function whoisTool(server) {
965
955
  },
966
956
  async ({ username }) => handleWhoisTool(username)
967
957
  );
968
- tool.update({ outputSchema: { user: z16.object({
969
- userid: z16.number(),
970
- name: z16.string(),
971
- groups: z16.array(z16.string()),
972
- implicitgroups: z16.array(z16.string()),
973
- rights: z16.array(z16.string()),
974
- editcount: z16.number(),
975
- registration: z16.string(),
976
- emailable: z16.string(),
977
- gender: z16.string(),
978
- blockinfo: z16.record(z16.unknown()).optional()
979
- }) } });
958
+ tool.update({ outputSchema: { user: z16.record(z16.unknown()) } });
980
959
  return tool;
981
960
  }
982
961
  async function handleWhoisTool(username) {
@@ -987,7 +966,7 @@ async function handleWhoisTool(username) {
987
966
  "whois",
988
967
  username
989
968
  );
990
- if (userInfo.missing) {
969
+ if (userInfo.missing !== void 0) {
991
970
  return errorResult(`User "${username}" not found.`);
992
971
  }
993
972
  return jsonResult({ user: userInfo });
@@ -1012,18 +991,7 @@ function whoareTool(server) {
1012
991
  },
1013
992
  async (params) => handleWhoareTool(params)
1014
993
  );
1015
- tool.update({ outputSchema: { users: z17.array(z17.object({
1016
- userid: z17.number(),
1017
- name: z17.string(),
1018
- groups: z17.array(z17.string()),
1019
- implicitgroups: z17.array(z17.string()),
1020
- rights: z17.array(z17.string()),
1021
- editcount: z17.number(),
1022
- registration: z17.string(),
1023
- emailable: z17.string(),
1024
- gender: z17.string(),
1025
- blockinfo: z17.record(z17.unknown()).optional()
1026
- })), count: z17.number() } });
994
+ tool.update({ outputSchema: { users: z17.array(z17.record(z17.unknown())), count: z17.number() } });
1027
995
  return tool;
1028
996
  }
1029
997
  async function handleWhoareTool(params) {
@@ -1429,16 +1397,7 @@ function getSiteStatsTool(server) {
1429
1397
  },
1430
1398
  async () => handleGetSiteStatsTool()
1431
1399
  );
1432
- tool.update({ outputSchema: { statistics: z27.object({
1433
- pages: z27.number(),
1434
- articles: z27.number(),
1435
- edits: z27.number(),
1436
- images: z27.number(),
1437
- users: z27.number(),
1438
- activeusers: z27.number(),
1439
- admins: z27.number(),
1440
- jobs: z27.number()
1441
- }) } });
1400
+ tool.update({ outputSchema: { statistics: z27.record(z27.unknown()) } });
1442
1401
  return tool;
1443
1402
  }
1444
1403
  async function handleGetSiteStatsTool() {
@@ -1617,7 +1576,7 @@ function editTool(server) {
1617
1576
  },
1618
1577
  async (params) => handleEditTool(params)
1619
1578
  );
1620
- tool.update({ outputSchema: { result: z32.string(), pageid: z32.number(), title: z32.string(), contentmodel: z32.string(), newrevid: z32.number(), newtimestamp: z32.string(), oldrevid: z32.number().optional() } });
1579
+ tool.update({ outputSchema: { result: z32.string(), pageid: z32.number(), title: z32.string(), contentmodel: z32.string().optional(), newrevid: z32.number(), newtimestamp: z32.string().optional(), oldrevid: z32.number().optional() } });
1621
1580
  return tool;
1622
1581
  }
1623
1582
  async function handleEditTool(params) {
@@ -1727,7 +1686,7 @@ function prependTool(server) {
1727
1686
  },
1728
1687
  async (params) => handlePrependTool(params)
1729
1688
  );
1730
- tool.update({ outputSchema: { result: z34.string(), pageid: z34.number(), title: z34.string(), contentmodel: z34.string(), newrevid: z34.number(), newtimestamp: z34.string(), oldrevid: z34.number().optional() } });
1689
+ tool.update({ outputSchema: { result: z34.string(), pageid: z34.number(), title: z34.string(), contentmodel: z34.string().optional(), newrevid: z34.number(), newtimestamp: z34.string().optional(), oldrevid: z34.number().optional() } });
1731
1690
  return tool;
1732
1691
  }
1733
1692
  async function handlePrependTool(params) {
@@ -1804,7 +1763,7 @@ function deleteTool(server) {
1804
1763
  },
1805
1764
  async (params) => handleDeleteTool(params)
1806
1765
  );
1807
- tool.update({ outputSchema: { title: z36.string(), reason: z36.string(), logid: z36.number() } });
1766
+ tool.update({ outputSchema: { title: z36.string(), reason: z36.string(), logid: z36.number().optional() } });
1808
1767
  return tool;
1809
1768
  }
1810
1769
  async function handleDeleteTool(params) {
@@ -1851,7 +1810,7 @@ function protectTool(server) {
1851
1810
  },
1852
1811
  async (params) => handleProtectTool(params)
1853
1812
  );
1854
- tool.update({ outputSchema: { title: z37.string(), reason: z37.string().optional(), protections: z37.array(z37.record(z37.unknown())), cascade: z37.boolean() } });
1813
+ tool.update({ outputSchema: { title: z37.string(), reason: z37.string().optional(), protections: z37.array(z37.record(z37.unknown())), cascade: z37.boolean().optional() } });
1855
1814
  return tool;
1856
1815
  }
1857
1816
  async function handleProtectTool(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiedada/nodemw-mcp-server",
3
- "version": "0.0.9",
3
+ "version": "0.0.12",
4
4
  "description": "MCP server for nodemw - MediaWiki API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",