updateWorkspace
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
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | The workspace's ID. | |
| workspace | No |
Implementation Reference
- src/tools/updateWorkspace.ts:32-62 (handler)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); } } - src/tools/updateWorkspace.ts:9-24 (schema)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(), }); - src/enabledResources.ts:113-117 (registration)Registration of 'updateWorkspace' in the 'full' array of enabled tools in enabledResources.ts.
'updateWorkspace', 'getWorkspaceGlobalVariables', 'updateWorkspaceGlobalVariables', 'getWorkspaceTags', 'updateWorkspaceTags', - src/enabledResources.ts:197-197 (registration)Registration of 'updateWorkspace' in the 'minimal' array of enabled tools in enabledResources.ts.
'updateWorkspace', - src/tools/updateWorkspace.ts:25-30 (helper)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, };