Skip to main content
Glama

list-category-objects

Retrieve all objects within a specific category from the PI Dashboard to organize and access related resources efficiently.

Instructions

List all objects for a specific category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryIdYesCategory ID

Implementation Reference

  • build/index.js:741-759 (registration)
    Registration of the 'list-category-objects' tool, including inline schema and handler function.
    server.tool("list-category-objects", "List all objects for a specific category", { categoryId: z.number().describe("Category ID") }, async ({ categoryId }) => { try { const categoryObjects = await authenticatedRequest(`/categories/${categoryId}/categoryObjects`); return { content: [{ type: "text", text: `Category objects retrieved successfully:\n${JSON.stringify(categoryObjects, null, 2)}` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error fetching category objects: ${getErrorMessage(error)}` }] }; } });
  • The main handler function that performs an authenticated API request to fetch category objects and returns the result as formatted text or an error message.
    }, async ({ categoryId }) => { try { const categoryObjects = await authenticatedRequest(`/categories/${categoryId}/categoryObjects`); return { content: [{ type: "text", text: `Category objects retrieved successfully:\n${JSON.stringify(categoryObjects, null, 2)}` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error fetching category objects: ${getErrorMessage(error)}` }] }; } });
  • Input schema using Zod validation for the required 'categoryId' parameter.
    categoryId: z.number().describe("Category ID")

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/mingzilla/pi-api-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server