get_workspace
Retrieve detailed information about a Postman workspace by providing its ID. Optionally include additional data to customize the response.
Instructions
Get details of a specific workspace
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Workspace ID | |
| include | No | Additional data to include in response |
Implementation Reference
- src/tools/api/workspaces/definitions.ts:27-44 (registration)Schema definition for 'get_workspace' tool, requiring 'workspace' (string ID) and optional 'include' parameter.
{ name: 'get_workspace', description: 'Get details of a specific workspace', inputSchema: { type: 'object', properties: { workspace: { type: 'string', description: 'Workspace ID', }, include: { type: 'string', description: 'Additional data to include in response', }, }, required: ['workspace'], }, }, - src/tools/api/workspaces/index.ts:67-75 (handler)Handler function 'getWorkspace' that validates workspace_id and makes a GET request to /workspaces/{workspace_id} with optional include parameter.
async getWorkspace(workspace_id: string, include?: string): Promise<ToolCallResponse> { if (!workspace_id) { throw new McpError(ErrorCode.InvalidParams, 'workspace_id is required'); } const response = await this.client.get(`/workspaces/${workspace_id}`, { params: { include } }); return this.createResponse(response.data); } - src/tools/api/workspaces/index.ts:31-32 (handler)Routing in handleToolCall that dispatches 'get_workspace' to this.getWorkspace(args.workspace, args.include).
case 'get_workspace': return await this.getWorkspace(args.workspace, args.include); - Input schema for 'get_workspace' with properties: workspace (string, required) and include (string, optional).
{ name: 'get_workspace', description: 'Get details of a specific workspace', inputSchema: { type: 'object', properties: { workspace: { type: 'string', description: 'Workspace ID', }, include: { type: 'string', description: 'Additional data to include in response', }, }, required: ['workspace'], },