Update Workspace
update_workspaceUpdate workspace settings such as public visibility and AI feature availability by providing the workspace ID.
Instructions
Update workspace settings
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Workspace ID | |
| public | No | Make workspace public | |
| enableAi | No | Enable AI features |
Implementation Reference
- src/tools/workspaces.ts:311-337 (handler)The main handler function that executes the update_workspace tool logic. It sends a GraphQL mutation (UpdateWorkspace) with optional fields for `public` and `enableAi`.
const updateWorkspaceHandler = async ({ id, public: isPublic, enableAi }: { id: string; public?: boolean; enableAi?: boolean }) => { try { const mutation = ` mutation UpdateWorkspace($input: UpdateWorkspaceInput!) { updateWorkspace(input: $input) { id public enableAi } } `; const input: any = { id }; if (isPublic !== undefined) input.public = isPublic; if (enableAi !== undefined) input.enableAi = enableAi; const data = await gql.request<{ updateWorkspace: any }>(mutation, { input }); return receipt("workspace.update", { workspaceId: id, id, ...data.updateWorkspace, }); } catch (error: any) { return text({ error: error.message }); } }; - src/tools/workspaces.ts:339-348 (schema)Schema registration for update_workspace including input parameters: id (required string), public (optional boolean), enableAi (optional boolean).
"update_workspace", { title: "Update Workspace", description: "Update workspace settings", inputSchema: { id: z.string().describe("Workspace ID"), public: z.boolean().optional().describe("Make workspace public"), enableAi: z.boolean().optional().describe("Enable AI features") } }, - src/tools/workspaces.ts:338-350 (registration)Registration of the 'update_workspace' tool on the MCP server via server.registerTool(), binding the handler and schema together.
server.registerTool( "update_workspace", { title: "Update Workspace", description: "Update workspace settings", inputSchema: { id: z.string().describe("Workspace ID"), public: z.boolean().optional().describe("Make workspace public"), enableAi: z.boolean().optional().describe("Enable AI features") } }, updateWorkspaceHandler as any ); - src/toolSurface.ts:84-86 (registration)toolSurface.ts listing 'update_workspace' as one of ALL_TOOLS (constant array of all tool names).
"update_workspace", "upload_blob", ] as const; - src/toolSurface.ts:174-176 (helper)Tool group definition for update_workspace specifying permission scopes: ['workspaces', 'workspaces.write', 'admin', 'write'].
update_workspace: ["workspaces", "workspaces.write", "admin", "write"], upload_blob: ["blobs", "blobs.write", "write"], };