getTaggedEntities
Retrieve Postman entities filtered by a specific tag. Requires an enterprise plan; returns 404 on other plans.
Instructions
Gets Postman entities by tag. Enterprise only - returns 404 on Free/Basic/Professional plans.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Tag ID | |
| cursor | No | Pagination cursor | |
| direction | No | Sort order | |
| entityType | No | Filter by entity type | |
| limit | No | Max entities to return |
Implementation Reference
- tools/postman_tools.py:1669-1721 (handler)The GetTaggedEntitiesTool class implementing the 'getTaggedEntities' tool. Contains the handler logic: __init__ sets the tool name, get_tool_description defines the input schema (slug required, optional cursor/direction/entityType/limit params), and run_tool makes a GET request to /tags/{slug}/entities with optional query params.
class GetTaggedEntitiesTool(ToolHandler): """Get tagged entities""" def __init__(self): super().__init__("getTaggedEntities") def get_tool_description(self) -> Tool: return Tool( name=self.name, description="Gets Postman entities by tag. Enterprise only - returns 404 on Free/Basic/Professional plans.", inputSchema={ "type": "object", "properties": { "slug": { "type": "string", "description": "Tag ID" }, "cursor": { "type": "string", "description": "Pagination cursor" }, "direction": { "type": "string", "enum": ["asc", "desc"], "description": "Sort order" }, "entityType": { "type": "string", "description": "Filter by entity type" }, "limit": { "type": "integer", "description": "Max entities to return" } }, "required": ["slug"] }, ) async def run_tool(self, args: dict) -> list[TextContent]: slug = args["slug"] params = {} if args.get("cursor"): params["cursor"] = args["cursor"] if args.get("direction"): params["direction"] = args["direction"] if args.get("entityType"): params["entityType"] = args["entityType"] if args.get("limit"): params["limit"] = args["limit"] result = await postman_api_call("GET", f"/tags/{slug}/entities", params=params) return [TextContent(type="text", text=json.dumps(result, indent=2))] - tools/postman_tools.py:1675-1706 (schema)Input schema for getTaggedEntities. Defines 'slug' (required, string, tag ID), 'cursor' (optional, string), 'direction' (optional, enum asc/desc), 'entityType' (optional, string), and 'limit' (optional, integer).
def get_tool_description(self) -> Tool: return Tool( name=self.name, description="Gets Postman entities by tag. Enterprise only - returns 404 on Free/Basic/Professional plans.", inputSchema={ "type": "object", "properties": { "slug": { "type": "string", "description": "Tag ID" }, "cursor": { "type": "string", "description": "Pagination cursor" }, "direction": { "type": "string", "enum": ["asc", "desc"], "description": "Sort order" }, "entityType": { "type": "string", "description": "Filter by entity type" }, "limit": { "type": "integer", "description": "Max entities to return" } }, "required": ["slug"] }, ) - tools/postman_tools.py:1889-1891 (registration)Registration of GetTaggedEntitiesTool() in the register_all_tools() function, which instantiates the handler for inclusion in the tool list.
# Other GetTaggedEntitiesTool(), RunCollectionTool(), - tools/postman_tools.py:1708-1721 (handler)The run_tool method execution logic: extracts 'slug' from args, builds optional query params (cursor, direction, entityType, limit), then calls the Postman API at GET /tags/{slug}/entities and returns the JSON result.
async def run_tool(self, args: dict) -> list[TextContent]: slug = args["slug"] params = {} if args.get("cursor"): params["cursor"] = args["cursor"] if args.get("direction"): params["direction"] = args["direction"] if args.get("entityType"): params["entityType"] = args["entityType"] if args.get("limit"): params["limit"] = args["limit"] result = await postman_api_call("GET", f"/tags/{slug}/entities", params=params) return [TextContent(type="text", text=json.dumps(result, indent=2))]