From 53aba868cddb73a569ca34664c41230dfa44f2c7 Mon Sep 17 00:00:00 2001 From: zzxsmile <523954578@qq.com> Date: Wed, 11 Nov 2026 22:22:50 +0800 Subject: [PATCH] =?UTF-8?q?MCP=20=E5=B7=A5=E5=85=B7=E9=9D=A2=204=E2=86=928?= =?UTF-8?q?=20=E4=BB=B6=EF=BC=9A=E5=AF=B9=E9=BD=90=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E7=89=88=20agent=20=E8=83=BD=E5=8A=9B=EF=BC=88?= =?UTF-8?q?=E9=91=AB=E5=93=A5=E8=BF=AD=E4=BB=A3=E4=BB=A4=202026-11-11?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit toggle_task(流转,done 前确认)/ update_task(字段编辑)/ get_activity(项目动态流)/ whoami(身份自查)——服务端 dispatch 均已就绪,此前客户端未声明导致员工在 DSH 里用不到。get_activity 为 qz 内核移植后 agent 工具面同步;transition_task 语义已由 toggle_task 覆盖不双开。 Co-Authored-By: Claude Code --- src/mcp-server.mjs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) 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 = {