Skip to main content
Glama

Update Workspace

update_workspace

Update workspace settings such as public visibility and AI feature availability by providing the workspace ID.

Instructions

Update workspace settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkspace ID
publicNoMake workspace public
enableAiNoEnable AI features

Implementation Reference

  • 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 });
        }
      };
  • 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")
      }
    },
  • 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
    );
  • toolSurface.ts listing 'update_workspace' as one of ALL_TOOLS (constant array of all tool names).
      "update_workspace",
      "upload_blob",
    ] as const;
  • 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"],
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description lacks any behavioral details beyond 'update'. It doesn't disclose safety, side effects, or required permissions, leaving the agent unaware of mutation implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise, front-loaded with the core action. However, it sacrifices informativeness; a few more words could enhance clarity without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is too sparse. It omits return value, idempotency, and any usage context, leaving gaps for effective invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already describes parameters. The description adds no extra meaning beyond the schema, meeting the baseline of 3 for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update workspace settings' clearly identifies the action (update) and resource (workspace settings). It distinguishes from sibling tools like create_workspace or delete_workspace, but does not specify which settings, relying on the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives such as create_workspace or get_workspace. No when-not-to-use or prerequisite conditions provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DAWNCR0W/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server