Skip to main content
Glama

Get workspaces (filtered and user-scoped)

getWorkspaces
Read-onlyIdempotent

List accessible workspaces with filters for type, creator, element, and pagination to locate workspace IDs for further operations.

Instructions

Gets all workspaces you have access to.

  • For “my …” requests, first call GET `/me` and pass `createdBy={me.user.id}`.

  • This endpoint's response contains the visibility field. Visibility determines who can access the workspace:

    • `personal` — Only you can access the workspace.

    • `team` — All team members can access the workspace.

    • `private` — Only invited team members can access the workspace (Professional and Enterprise).

    • `public` — Everyone can access the workspace.

    • `partner` — Invited team members and partners (Professional and Enterprise).

  • For tools that require the workspace ID, and no workspace ID is provided, ask the user to provide the workspace ID. If the user does not provide the workspace ID, call this first with the createdBy parameter to use the first workspace.

  • Results are paginated. Use the `cursor` parameter to retrieve additional pages.

  • Examples:

    • “List my workspaces” → GET `/me`, then GET `/workspaces?createdBy={me.user.id}&limit=100`

    • “List my personal workspaces” → GET `/me`, then GET `/workspaces?type=personal&createdBy={me.user.id}&limit=100`

    • “List all public workspaces” → GET `/workspaces?type=public&limit=100`

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoThe type of workspace to filter the response by. One of: `personal`, `team`, `private`, `public`, `partner`. - For “my …” requests, this can be combined with `createdBy`. If type is not specified, it will search across all types for that user.
limitNoThe maximum number of workspaces to return per page. Defaults to 100.
cursorNoThe cursor to get the next set of results in a paginated response. Get this value from the `meta.nextCursor` field in the previous response.
includeNoInclude the following information in the endpoint's response: - `mocks:deactivated` — Include all deactivated mock servers in the response. - `scim` — Return the SCIM user IDs of the workspace creator and who last modified it.
createdByNoReturn only workspaces created by the specified Postman user ID. - For “my …” requests, set `createdBy` to the current user’s ID from GET `/me` (`me.user.id`). - If the user's ID is not known, first call GET `/me`, then retry with `createdBy`.
elementIdNoFilter results to return the workspace where the given element's ID is located. When filtering by collection, you must use the collection's unique ID (`userId`-`collection`). If you pass this query parameter, you must also pass the `elementType` query parameter.
elementTypeNoFilter results to return the workspace where the given element type is located. If you pass this query parameter, you must also pass the `elementId` query parameter.
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds valuable behavioral context: it explains the visibility field and its values, which affects what the agent can infer about access control. It also mentions pagination behavior and the need to call /me first for user-scoped queries. This adds context beyond the annotations, though it doesn't describe the full response structure (no output schema).

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 well-structured with bullet points and examples, making it easy to scan. It's a bit long but each section adds value: purpose, visibility explanation, usage notes, pagination, and examples. The front-loading is good (purpose first), and the examples are concrete. It could be slightly more concise, but the detail is justified given the tool's complexity.

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

Completeness4/5

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

Given the tool's complexity (7 parameters, no output schema, no required parameters), the description is quite complete. It covers the main use cases, explains the visibility field, provides examples, and mentions pagination. The only gap is that it doesn't describe the response structure, but since there's no output schema, the agent might need to infer that. However, the description does mention the 'meta.nextCursor' field, which gives some response context. Overall, it's sufficient for an agent to use the tool effectively.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents all 7 parameters. The description adds value by explaining the 'createdBy' parameter's role in 'my …' requests and providing examples of how to combine parameters (e.g., type=personal&createdBy=...). It also clarifies the 'type' parameter's behavior when not specified. This goes beyond the schema's basic descriptions, though the schema already covers the parameter meanings well.

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 the tool's purpose: 'Gets all workspaces you have access to.' It specifies the resource (workspaces) and the action (get), and distinguishes it from sibling tools like getWorkspace (singular) and createWorkspace by focusing on listing/filtering workspaces with user-scoping.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it explains when to call GET /me first for 'my …' requests, how to handle missing workspace IDs, and includes concrete examples for different scenarios. It also mentions pagination with cursor, which is a clear usage instruction. This goes beyond just stating the purpose and helps the agent decide when to use this tool.

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