You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saved code tools: a tool whose endpointMapping.method = 'code' runs a stored program through the code-runner instead of calling one upstream endpoint. Depends on #1361 and the schema issue.
Scope
Execution: a code branch in DynamicMcpTools.executeTool / executeWithEngine (dynamic-mcp-tools.ts, next to the static branch) that calls CodeExecutorService with a bridge scoped to the tool's uses connectors and the caller's role. Fields on endpointMapping: code, uses: [{connectorId, tools}], runAs: 'invoker' | 'definer' (definer = admin-only, stored-procedure semantics), allowWrites.
Read/write: a code tool's own annotation derives from allowWrites; writes are only allowed in an admin-approved code tool, never inline.
Tool editor: add code to METHODS_BY_TYPE and an editor panel (code + uses + runAs + allowWrites). Reuse assertCanWriteConnector (VIEWER blocked; owner/ADMIN only) and the secret guard.
Offered only on servers whose connectors cover all uses. ToolRoleAccess, isEnabled, audit toolId, export/import work unchanged because it is an McpTool.
Respect McpServerConfig.codeMode; policy never read from tool args; shared-endpoint exclusions reused; assertEnterprise for definer/writes where the plan gate requires it (see the gating issue).
Implemented (commits 6d872de, 700ad0d): saved code tools (endpointMapping.method = 'code') with the bridge enforcing uses/read-write/invoker-vs-definer and no nested code tools; save-time validation and authority gates (definer = admin, allowWrites = Enterprise, uses must be same-workspace); the Code tool type in the editor (en/it/de); and exclusion from the shared /mcp endpoint. Remaining: the agent-proposal flow (code_propose_tool → pending kind='code' suggestion → admin materializes it into an McpTool) needs extra columns to store the proposed code/uses, so it will come as its own schema change/issue; and a richer connectors picker in the editor (today it takes the uses list as JSON).
Delivered in PR #1366 (merged into main as be4742a). Code mode ships off by default; the agent-proposal follow-up is tracked in #1369, and the Cloud runner operations in this issue remain operational/out-of-repo.
Activity
helpcodeai commentedon Oct 31, 2026
Implemented (commits 6d872de, 700ad0d): saved code tools (
endpointMapping.method = 'code') with the bridge enforcing uses/read-write/invoker-vs-definer and no nested code tools; save-time validation and authority gates (definer = admin, allowWrites = Enterprise, uses must be same-workspace); the Code tool type in the editor (en/it/de); and exclusion from the shared/mcpendpoint. Remaining: the agent-proposal flow (code_propose_tool→ pendingkind='code'suggestion → admin materializes it into an McpTool) needs extra columns to store the proposed code/uses, so it will come as its own schema change/issue; and a richer connectors picker in the editor (today it takes the uses list as JSON).helpcodeai commentedon Oct 31, 2026
Delivered in PR #1366 (merged into main as be4742a). Code mode ships off by default; the agent-proposal follow-up is tracked in #1369, and the Cloud runner operations in this issue remain operational/out-of-repo.
Add code mode: isolated runner, executor, saved code tools, schema
Never serve code tools on the shared /mcp endpoint
Document code mode
Add a live end-to-end code mode integration test