@pschroee/redmine-mcp 0.4.4 → 0.5.0

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.
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { formatWikiPage, formatWikiPageList } from "../formatters/index.js";
2
3
  export function registerWikiTools(server, client) {
3
4
  server.registerTool("list_wiki_pages", {
4
5
  description: "List all wiki pages in a project",
@@ -7,8 +8,13 @@ export function registerWikiTools(server, client) {
7
8
  },
8
9
  }, async (params) => {
9
10
  const result = await client.listWikiPages(params.project_id);
11
+ if ("error" in result) {
12
+ return {
13
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
14
+ };
15
+ }
10
16
  return {
11
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
17
+ content: [{ type: "text", text: formatWikiPageList(result) }],
12
18
  };
13
19
  });
14
20
  server.registerTool("get_wiki_page", {
@@ -24,8 +30,13 @@ export function registerWikiTools(server, client) {
24
30
  version: params.version,
25
31
  include: params.include,
26
32
  });
33
+ if ("error" in result) {
34
+ return {
35
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
36
+ };
37
+ }
27
38
  return {
28
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
39
+ content: [{ type: "text", text: formatWikiPage(result) }],
29
40
  };
30
41
  });
31
42
  server.registerTool("create_wiki_page", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pschroee/redmine-mcp",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "MCP server for Redmine - full API access with configurable tool groups",
5
5
  "type": "module",
6
6
  "bin": {