strapi_list_categories
Retrieve all available categories from your Strapi CMS content. Use this tool to access category data for organizing and filtering content.
Instructions
List all categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:555-566 (handler)The handler function that executes the tool logic: fetches categories from Strapi CMS content-manager API and returns 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-192 (registration)Tool registration in ListToolsRequestSchema response, including name, description, and empty input schema.{ name: 'strapi_list_categories', description: 'List all categories', inputSchema: { type: 'object', properties: {} }
- index.js:383-384 (registration)Dispatch case in CallToolRequestSchema handler that routes to the listCategories method.case 'strapi_list_categories': return await this.listCategories(headers)
- index.js:189-192 (schema)Input schema definition for the strapi_list_categories tool (no required parameters).inputSchema: { type: 'object', properties: {} }
- index.js:115-115 (schema)Reference to the tool in the schema description of strapi_create_blog_post's category_id parameter.category_id: { type: 'number', description: 'Category ID (use strapi_list_categories)' },