版本 / Version
v3.3.2 (commit 655e74f)
部署方式 / Deployment
自建服务器 / Self-hosted
问题描述 / What happened?
启用 DEVIN_CONNECT_TOOL_DEF_TAGS 原生工具路径后,Cursor IDE 发送其 21 个工具的完整清单时,8 个工具触发 upstream permission_denied,整个请求被拒绝(不只是被拦截的工具)。
被拦截的 8 个工具:AskQuestion, Glob, Grep, Read, ReadLints, Shell, WebFetch, WebSearch。
根因:upstream server.codeium.com 对工具描述做指纹匹配(pattern match),扫描位置包括:
- ToolDef
#10.description 顶层字段
- 参数 JSON Schema 中的
description annotation keys
gate 在组合上触发——只删 (1) 或只删 (2) 对大多数工具都不够。这是一个反 MCP 竞争的 gate:它指纹匹配知名工具描述(Read / Grep / Shell 等),拒绝看起来像代理竞品工具集的请求。
复现步骤 / Steps to reproduce
# 1. 启用原生工具路径
DEVIN_CONNECT=1
DEVIN_CONNECT_TOOL_DEF_TAGS=name=1,description=2,parameters=3
# 2. 发送包含 Cursor 21-tool 清单的请求(或最小复现:只带 Read 工具)
curl http://127.0.0.1:3003/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Read the file"}],
"tools": [{"type": "function", "function": {
"name": "Read",
"description": "Reads a file from the local filesystem...",
"parameters": {"type": "object", "properties": {
"file_path": {"type": "string", "description": "The absolute path to the file"}
}, "required": ["file_path"]}
}}]
}'
# → permission_denied: "Unable to process request due to an MCP configuration issue."
客户端和版本 / Client and version
Cursor (任意版本) / Claude Code / Cline / opencode — 任何携带 MCP-style 工具描述的客户端
请求路径 / API route
/v1/chat/completions (DEVIN_CONNECT native tool path)
工具信息 / Tool information
tools: Cursor 21-tool inventory (AskQuestion, CallMcpTool, Delete, FetchMcpResource, Glob, Grep, Read, Ls, ReadLints, Shell, AwaitShell, WriteShellStdin, ForceBackgroundShell, PatchEdit, SwitchMode, Task, TodoWrite, WebFetch, WebSearch, Write, GenerateImage)
schema count: 21
tool_choice: auto
DEVIN_CONNECT_TOOL_DEF_TAGS: name=1,description=2,parameters=3
被拦截的 8 个:AskQuestion, Glob, Grep, Read, ReadLints, Shell, WebFetch, WebSearch
日志 / Logs
[ERROR] Chat[xxx]: DEVIN_CONNECT error (PERMISSION_DENIED -> 403): Unable to process request due to an MCP configuration issue.
模型 / Model
任意(gate 在工具描述层触发,与模型无关)
环境 / Environment
Node: v20+
OS: 任意
DEVIN_CONNECT=1, DEVIN_CONNECT_TOOL_DEF_TAGS=name=1,description=2,parameters=3
版本 / Version
v3.3.2 (commit 655e74f)
部署方式 / Deployment
自建服务器 / Self-hosted
问题描述 / What happened?
启用
DEVIN_CONNECT_TOOL_DEF_TAGS原生工具路径后,Cursor IDE 发送其 21 个工具的完整清单时,8 个工具触发 upstreampermission_denied,整个请求被拒绝(不只是被拦截的工具)。被拦截的 8 个工具:
AskQuestion,Glob,Grep,Read,ReadLints,Shell,WebFetch,WebSearch。根因:upstream
server.codeium.com对工具描述做指纹匹配(pattern match),扫描位置包括:#10.description顶层字段descriptionannotation keysgate 在组合上触发——只删 (1) 或只删 (2) 对大多数工具都不够。这是一个反 MCP 竞争的 gate:它指纹匹配知名工具描述(Read / Grep / Shell 等),拒绝看起来像代理竞品工具集的请求。
复现步骤 / Steps to reproduce
客户端和版本 / Client and version
Cursor (任意版本) / Claude Code / Cline / opencode — 任何携带 MCP-style 工具描述的客户端
请求路径 / API route
/v1/chat/completions (DEVIN_CONNECT native tool path)
工具信息 / Tool information
tools: Cursor 21-tool inventory (AskQuestion, CallMcpTool, Delete, FetchMcpResource, Glob, Grep, Read, Ls, ReadLints, Shell, AwaitShell, WriteShellStdin, ForceBackgroundShell, PatchEdit, SwitchMode, Task, TodoWrite, WebFetch, WebSearch, Write, GenerateImage)
schema count: 21
tool_choice: auto
DEVIN_CONNECT_TOOL_DEF_TAGS: name=1,description=2,parameters=3
被拦截的 8 个:AskQuestion, Glob, Grep, Read, ReadLints, Shell, WebFetch, WebSearch
日志 / Logs
[ERROR] Chat[xxx]: DEVIN_CONNECT error (PERMISSION_DENIED -> 403): Unable to process request due to an MCP configuration issue.模型 / Model
任意(gate 在工具描述层触发,与模型无关)
环境 / Environment
Node: v20+
OS: 任意
DEVIN_CONNECT=1, DEVIN_CONNECT_TOOL_DEF_TAGS=name=1,description=2,parameters=3