Skip to main content
Glama

getTaggedEntities

Read-onlyIdempotent

Retrieve Postman entities (workspaces, APIs, collections) tagged with a specific tag to organize and filter resources.

Instructions

Requires an Enterprise plan. Tagging is only available on Postman Enterprise plans. This tool returns a 404 error on Free, Basic, and Professional accounts.

Gets Postman elements (entities) by a given tag. Tags enable you to organize and search workspaces, APIs, and collections that contain shared tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesThe tag's ID within a team or individual (non-team) user scope.
limitNoThe maximum number of tagged elements to return in a single call.
directionNoThe ascending (`asc`) or descending (`desc`) order to sort the results by, based on the time of the entity's tagging.desc
cursorNoThe cursor to get the next set of results in the paginated response. If you pass an invalid value, the API only returns the first set of results.
entityTypeNoFilter results for the given entity type.

Implementation Reference

  • Handler function that calls the Postman API endpoint /tags/{slug}/entities with query parameters (limit, direction, cursor, entityType) to get tagged entities.
    export async function handler(
      args: z.infer<typeof parameters>,
      extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders; serverContext?: ServerContext }
    ): Promise<CallToolResult> {
      try {
        const endpoint = `/tags/${args.slug}/entities`;
        const query = new URLSearchParams();
        if (args.limit !== undefined) query.set('limit', String(args.limit));
        if (args.direction !== undefined) query.set('direction', String(args.direction));
        if (args.cursor !== undefined) query.set('cursor', String(args.cursor));
        if (args.entityType !== undefined) query.set('entityType', String(args.entityType));
        const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
        const options: any = {
          headers: extra.headers,
        };
        const result = await extra.client.get(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: slug (required), limit (default 10), direction (default 'desc'), cursor (optional), entityType (optional enum).
    export const parameters = z.object({
      slug: z
        .string()
        .regex(new RegExp('^[a-z][a-z0-9-]*[a-z0-9]+$'))
        .min(2)
        .max(64)
        .describe("The tag's ID within a team or individual (non-team) user scope."),
      limit: z
        .number()
        .int()
        .lte(50)
        .describe('The maximum number of tagged elements to return in a single call.')
        .default(10),
      direction: z
        .enum(['asc', 'desc'])
        .describe(
          "The ascending (`asc`) or descending (`desc`) order to sort the results by, based on the time of the entity's tagging."
        )
        .default('desc'),
      cursor: z
        .string()
        .describe(
          'The cursor to get the next set of results in the paginated response. If you pass an invalid value, the API only returns the first set of results.'
        )
        .optional(),
      entityType: z
        .enum(['api', 'collection', 'workspace'])
        .describe('Filter results for the given entity type.')
        .optional(),
    });
  • Registration of 'getTaggedEntities' in the full list of enabled resources.
    'getTaggedEntities',
  • Registration of 'getTaggedEntities' in the minimal list of enabled resources.
    'getTaggedEntities',
  • Helper function used by the handler to convert errors to MCP errors.
    export function asMcpError(error: unknown): McpError {
      const cause = (error as any)?.cause ?? String(error);
      return new McpError(ErrorCode.InternalError, cause);
    }
Behavior3/5

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

Beyond annotations (readOnlyHint, destructiveHint, idempotentHint), the description adds that the tool returns a 404 on non-Enterprise accounts. However, it does not explain pagination behavior, cursor usage, or the response format, which would be useful for a read tool.

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

Conciseness5/5

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

The description is extremely concise, using two sentences to convey the plan requirement and the core functionality. It is front-loaded with the critical plan restriction, and every phrase adds value.

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?

Given the tool has 5 parameters including cursor for pagination, and no output schema, the description should ideally explain the pagination mechanism or response structure. It only provides high-level purpose. While annotations cover safety, the description lacks detail about how results are returned.

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 description coverage is 100%, so the schema already documents each parameter's meaning. The description does not add any additional semantic nuance beyond stating the overall purpose, so it meets the baseline but does not exceed it.

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 gets Postman elements (entities) by a given tag, using a specific verb and resource. It differentiates from sibling tools like getWorkspaces or getCollections because those retrieve all entities without tag filtering.

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 explicitly states that an Enterprise plan is required, and that it returns a 404 on other plans. This provides clear when-not-to-use guidance. However, it does not explicitly compare with sibling tools or suggest alternative tools for non-enterprise users.

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