feat: move MCP to /mcp and add teammate operations (#500)

* feat(operations): move MCP to /mcp and add search, comment, metadata, version, and upload operations

- Serve the MCP server at /mcp instead of /api/mcp
- Add search_assets, copy_assets, get_folder_instructions, list_comments,
  create_comment, resolve_comment, list_metadata_fields,
  update_asset_metadata, create_version_stack, list_versions, and
  remove_version on the agent, MCP, and CLI
- Add create_file and create_version (agent, MCP) with Creation Context
  metadata, and complete_upload (MCP) for presigned two-step uploads
- Replace the native agent create_file/create_version tools with
  Operation-backed ones
- Route the comment-complete, metadata, copy, version stack, and
  AGENTS.md read REST endpoints through their Operations

* docs(readme): add built-in MCP server and CLI to features list
This commit is contained in:
Yiling-J
2026-10-27 14:37:26 +08:00
committed by GitHub
parent 50fbd97953
commit b3cae4f2b0
81 changed files with 4111 additions and 1397 deletions
@@ -142,6 +142,61 @@ const BUILTIN_TOOLS = [
name: () => m.agent_tool_delete_asset_name(),
description: () => m.agent_tool_delete_asset_desc(),
},
{
id: 'search_assets',
name: () => m.agent_tool_search_assets_name(),
description: () => m.agent_tool_search_assets_desc(),
},
{
id: 'copy_assets',
name: () => m.agent_tool_copy_assets_name(),
description: () => m.agent_tool_copy_assets_desc(),
},
{
id: 'get_folder_instructions',
name: () => m.agent_tool_get_folder_instructions_name(),
description: () => m.agent_tool_get_folder_instructions_desc(),
},
{
id: 'list_comments',
name: () => m.agent_tool_list_comments_name(),
description: () => m.agent_tool_list_comments_desc(),
},
{
id: 'create_comment',
name: () => m.agent_tool_create_comment_name(),
description: () => m.agent_tool_create_comment_desc(),
},
{
id: 'resolve_comment',
name: () => m.agent_tool_resolve_comment_name(),
description: () => m.agent_tool_resolve_comment_desc(),
},
{
id: 'list_metadata_fields',
name: () => m.agent_tool_list_metadata_fields_name(),
description: () => m.agent_tool_list_metadata_fields_desc(),
},
{
id: 'update_asset_metadata',
name: () => m.agent_tool_update_asset_metadata_name(),
description: () => m.agent_tool_update_asset_metadata_desc(),
},
{
id: 'create_version_stack',
name: () => m.agent_tool_create_version_stack_name(),
description: () => m.agent_tool_create_version_stack_desc(),
},
{
id: 'list_versions',
name: () => m.agent_tool_list_versions_name(),
description: () => m.agent_tool_list_versions_desc(),
},
{
id: 'remove_version',
name: () => m.agent_tool_remove_version_name(),
description: () => m.agent_tool_remove_version_desc(),
},
]
type AgentFormValues = z.infer<typeof agentFormSchema>
@@ -79,6 +79,10 @@ const STANDARD_TOOLS = [
{ value: 'rename_asset', label: () => m.agent_tool_rename_asset_name() },
{ value: 'move_assets', label: () => m.agent_tool_move_assets_name() },
{ value: 'delete_asset', label: () => m.agent_tool_delete_asset_name() },
{ value: 'search_assets', label: () => m.agent_tool_search_assets_name() },
{ value: 'copy_assets', label: () => m.agent_tool_copy_assets_name() },
{ value: 'create_comment', label: () => m.agent_tool_create_comment_name() },
{ value: 'update_asset_metadata', label: () => m.agent_tool_update_asset_metadata_name() },
]
/* eslint-disable @typescript-eslint/naming-convention */
+22
View File
@@ -633,6 +633,28 @@
"agent_tool_move_assets_desc": "Allows the agent to move one or more assets to another folder in Shumai.",
"agent_tool_delete_asset_name": "Delete Asset",
"agent_tool_delete_asset_desc": "Allows the agent to delete a single file or folder in Shumai.",
"agent_tool_search_assets_name": "Search Assets",
"agent_tool_search_assets_desc": "Allows the agent to search for files by name, by meaning, or by metadata such as status.",
"agent_tool_copy_assets_name": "Copy Assets",
"agent_tool_copy_assets_desc": "Allows the agent to copy files or folders into another folder of the team.",
"agent_tool_get_folder_instructions_name": "Read Folder Instructions",
"agent_tool_get_folder_instructions_desc": "Allows the agent to read a folder's instructions for AI agents (AGENTS.md).",
"agent_tool_list_comments_name": "Read Comments",
"agent_tool_list_comments_desc": "Allows the agent to read the review comments and replies on a file.",
"agent_tool_create_comment_name": "Post Comment",
"agent_tool_create_comment_desc": "Allows the agent to comment on files and reply to comments on your behalf.",
"agent_tool_resolve_comment_name": "Resolve Comment",
"agent_tool_resolve_comment_desc": "Allows the agent to mark comments as resolved or reopen them.",
"agent_tool_list_metadata_fields_name": "List Metadata Fields",
"agent_tool_list_metadata_fields_desc": "Allows the agent to see a project's metadata fields and their choices.",
"agent_tool_update_asset_metadata_name": "Update Metadata",
"agent_tool_update_asset_metadata_desc": "Allows the agent to set metadata such as status, rating, or tags on files.",
"agent_tool_create_version_stack_name": "Create Version Stack",
"agent_tool_create_version_stack_desc": "Allows the agent to stack files in the same folder as versions of one asset.",
"agent_tool_list_versions_name": "List Versions",
"agent_tool_list_versions_desc": "Allows the agent to list the versions in a version stack.",
"agent_tool_remove_version_name": "Remove Version",
"agent_tool_remove_version_desc": "Allows the agent to take a version out of its stack, keeping the file.",
"enabled": "Enabled",
"disabled": "Disabled",
"no_skills_available": "No skills available.",
+22
View File
@@ -633,6 +633,28 @@
"agent_tool_move_assets_desc": "允许智能体将一个或多个资产移动到 Shumai 中的其他文件夹。",
"agent_tool_delete_asset_name": "删除资产",
"agent_tool_delete_asset_desc": "允许智能体在 Shumai 中删除单个文件或文件夹。",
"agent_tool_search_assets_name": "搜索资产",
"agent_tool_search_assets_desc": "允许智能体按名称、语义或状态等元数据搜索文件。",
"agent_tool_copy_assets_name": "复制资产",
"agent_tool_copy_assets_desc": "允许智能体将文件或文件夹复制到团队内的其他文件夹。",
"agent_tool_get_folder_instructions_name": "读取文件夹说明",
"agent_tool_get_folder_instructions_desc": "允许智能体读取文件夹中给 AI 智能体的说明(AGENTS.md)。",
"agent_tool_list_comments_name": "读取评论",
"agent_tool_list_comments_desc": "允许智能体读取文件上的审阅评论和回复。",
"agent_tool_create_comment_name": "发表评论",
"agent_tool_create_comment_desc": "允许智能体以您的身份评论文件或回复评论。",
"agent_tool_resolve_comment_name": "解决评论",
"agent_tool_resolve_comment_desc": "允许智能体将评论标记为已解决或重新打开。",
"agent_tool_list_metadata_fields_name": "列出元数据字段",
"agent_tool_list_metadata_fields_desc": "允许智能体查看项目的元数据字段及其选项。",
"agent_tool_update_asset_metadata_name": "更新元数据",
"agent_tool_update_asset_metadata_desc": "允许智能体设置文件的状态、评分或标签等元数据。",
"agent_tool_create_version_stack_name": "创建版本堆叠",
"agent_tool_create_version_stack_desc": "允许智能体将同一文件夹中的文件堆叠为同一资产的多个版本。",
"agent_tool_list_versions_name": "列出版本",
"agent_tool_list_versions_desc": "允许智能体列出版本堆叠中的各个版本。",
"agent_tool_remove_version_name": "移出版本",
"agent_tool_remove_version_desc": "允许智能体将某个版本移出堆叠,文件本身会保留。",
"enabled": "已启用",
"disabled": "已禁用",
"no_skills_available": "暂无可用技能。",