@baitong-dev/todo-mcp 0.0.2 → 0.0.3

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 +8 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ const todowrite_txt_1 = __importDefault(require("../todowrite.txt"));
45
45
  const todoread_txt_1 = __importDefault(require("../todoread.txt"));
46
46
  const mcp_helpers_1 = require("@baitong-dev/mcp-helpers");
47
47
  const MCP_NAME = 'Todo MCP';
48
- const MCP_VERSION = '0.0.2';
48
+ const MCP_VERSION = '0.0.3';
49
49
  function getTodoDir() {
50
50
  const dir = path_1.default.join(mcp_helpers_1.MCP_HOME_DIR, 'todos');
51
51
  if (!fs.existsSync(dir)) {
@@ -99,12 +99,16 @@ server.registerTool('todowrite', {
99
99
  })
100
100
  }, async (args) => {
101
101
  setTodoList(args.toolInfo.sessionId, args.todos);
102
+ const todos = args.todos;
102
103
  const result = {
103
- title: `${args.todos.filter(x => x.status !== 'completed').length} todos`,
104
- todos: args.todos
104
+ title: `${todos.filter(x => x.status !== 'completed').length} todos`,
105
+ metadata: {
106
+ todos
107
+ },
108
+ output: JSON.stringify(todos, null, 2)
105
109
  };
106
110
  return {
107
- content: [{ type: 'text', text: JSON.stringify(result) }],
111
+ content: [{ type: 'text', text: result.output }],
108
112
  structuredContent: result
109
113
  };
110
114
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baitong-dev/todo-mcp",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "main": "./dist/index.js",
5
5
  "bin": {
6
6
  "@baitong-dev/todo-mcp": "./dist/index.js"