diff --git a/src/mcp-server.mjs b/src/mcp-server.mjs index 390a06d..c09ba64 100644 --- a/src/mcp-server.mjs +++ b/src/mcp-server.mjs @@ -65,6 +65,46 @@ const TOOLS = [ }, }, }, + // 2026-11-11 迭代:对齐浏览器版 agent 能力面(服务端 dispatch 已就绪,此前客户端未声明导致员工用不到) + { + name: 'toggle_task', + description: '流转任务状态。传 to 指定目标(todo/doing/blocked/done);不传 to 则在 todo↔done 间切换。流转到 done 前先向用户确认。', + inputSchema: { + type: 'object', + required: ['id'], + properties: { + id: { type: 'integer', description: '任务 id' }, + to: { type: 'string', enum: ['todo', 'doing', 'blocked', 'done'], description: '目标状态(可省略=todo↔done 切换)' }, + }, + }, + }, + { + name: 'update_task', + description: '编辑任务字段(标题/负责人/截止/优先级/项目/挂节点等,patch 对象)。', + inputSchema: { + type: 'object', + required: ['id'], + properties: { + id: { type: 'integer', description: '任务 id' }, + patch: { type: 'object', description: '要改的字段,如 {"title":"...","due":"2026-11-20"}' }, + }, + }, + }, + { + name: 'get_activity', + description: '查弹匣项目动态流(谁/何时/干了什么)。可按项目 id 过滤,省略看全部。', + inputSchema: { + type: 'object', + properties: { + project: { type: 'string', description: '项目 id 过滤(可省略看全部)' }, + }, + }, + }, + { + name: 'whoami', + description: '查当前接入身份(姓名/角色/可见部门)。接入排障时先调这个。', + inputSchema: { type: 'object', properties: {} }, + }, ] const TOOL_MAP = {