Skip to main content
Glama

updateWorkspace

Idempotent

Update a workspace's name, visibility type, description, or summary. Control workspace settings directly via this tool.

Instructions

Updates a workspace's property, such as its name or visibility.

Note:

  • This endpoint does not support the following visibility changes:

    • `private` to `public`, `public` to `private`, and `private` to `personal` for Free and Solo plans.

    • `public` to `personal` for team users only.

  • There are rate limits when publishing public workspaces.

  • Public team workspace names must be unique.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesThe workspace's ID.
workspaceNo

Implementation Reference

  • The handler function that executes the 'updateWorkspace' tool logic. It sends a PUT request to /workspaces/{workspaceId} with the updated workspace properties (name, type, description, about).
    export async function handler(
      args: z.infer<typeof parameters>,
      extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders; serverContext?: ServerContext }
    ): Promise<CallToolResult> {
      try {
        const endpoint = `/workspaces/${args.workspaceId}`;
        const query = new URLSearchParams();
        const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
        const bodyPayload: any = {};
        if (args.workspace !== undefined) bodyPayload.workspace = args.workspace;
        const options: any = {
          body: JSON.stringify(bodyPayload),
          contentType: ContentType.Json,
          headers: extra.headers,
        };
        const result = await extra.client.put(url, options);
        return {
          content: [
            {
              type: 'text',
              text: `${typeof result === 'string' ? result : JSON.stringify(result, null, 2)}`,
            },
          ],
        };
      } catch (e: unknown) {
        if (e instanceof McpError) {
          throw e;
        }
        throw asMcpError(e);
      }
    }
  • Zod schema defining the input parameters: workspaceId (required string), workspace object with optional name, type (enum), description, and about fields.
    export const parameters = z.object({
      workspaceId: z.string().describe("The workspace's ID."),
      workspace: z
        .object({
          name: z.string().describe("The workspace's new name.").optional(),
          type: z
            .enum(['private', 'personal', 'team', 'public'])
            .describe(
              'The new workspace visibility [type](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/managing-workspaces/#changing-workspace-visibility). This property does not support the following workspace visibility changes:\n- `private` to `public`, `public` to `private`, and `private` to `personal` for Free and Basic [plans](https://www.postman.com/pricing/).\n- `public` to `personal` for team users.\n'
            )
            .optional(),
          description: z.string().describe('The new workspace description.').optional(),
          about: z.string().describe('A brief summary about the workspace.').optional(),
        })
        .optional(),
    });
  • Registration of 'updateWorkspace' in the 'full' array of enabled tools in enabledResources.ts.
    'updateWorkspace',
    'getWorkspaceGlobalVariables',
    'updateWorkspaceGlobalVariables',
    'getWorkspaceTags',
    'updateWorkspaceTags',
  • Registration of 'updateWorkspace' in the 'minimal' array of enabled tools in enabledResources.ts.
    'updateWorkspace',
  • Annotations for the tool providing metadata: title, readOnlyHint=false, destructiveHint=false, idempotentHint=true.
    export const annotations = {
      title: "Updates a workspace's property, such as its name or visibility.",
      readOnlyHint: false,
      destructiveHint: false,
      idempotentHint: true,
    };
Behavior4/5

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

Annotations already indicate idempotence and non-destructiveness; the description adds value by detailing specific unsupported changes and rate limits, enhancing transparency beyond what annotations provide.

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?

The description is concise with a clear opening sentence and a structured note section. It front-loads the main action, though the bullet points could be slightly more compact.

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

Completeness3/5

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

No output schema is present, and the description does not explain return values or side effects of the update. The idempotentHint is noted, but additional context about the response would improve completeness.

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?

The input schema already provides detailed descriptions for both parameters, including the workspace object fields. The tool description adds minimal extra value beyond repeating 'name or visibility', which is already in the schema.

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

Purpose5/5

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

The description clearly states it updates workspace properties like name or visibility, and is distinct from sibling tools such as createWorkspace, getWorkspace, etc.

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

Usage Guidelines4/5

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

The description includes explicit notes about unsupported visibility changes and rate limits, providing contextual guidance. However, it does not directly contrast with alternatives.

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/postmanlabs/postman-mcp-server'

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