strapi_list_categories
Retrieve all categories from Strapi CMS to organize and filter content like blog posts, tutorials, and events.
Instructions
List all categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:555-567 (handler)The core handler function for strapi_list_categories tool. It makes an authenticated GET request to Strapi's content-manager API to list all categories and returns the JSON response.async listCategories (headers) { const response = await axios.get( `${this.strapiUrl}/content-manager/collection-types/api::category.category`, { headers } ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } }
- index.js:186-193 (registration)Tool registration in the ListTools handler. Defines the tool name, description, and input schema (empty object since no parameters required).{ name: 'strapi_list_categories', description: 'List all categories', inputSchema: { type: 'object', properties: {} } },
- index.js:383-384 (handler)Dispatch in the central CallToolRequest handler switch statement that invokes the listCategories method for this tool.case 'strapi_list_categories': return await this.listCategories(headers)
- index.js:189-192 (schema)Input schema definition for the tool (no required parameters).inputSchema: { type: 'object', properties: {} }