strapi_list_tutorials
Retrieve and filter tutorials from Strapi CMS with options for pagination, status, difficulty, and category sorting.
Instructions
List all tutorials with filtering and pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number | |
| pageSize | No | Results per page | |
| status | No | Filter by status | all |
| difficulty | No | Filter by difficulty | |
| category_id | No | Filter by category ID | |
| sort | No | Sort field and direction | createdAt:desc |
Implementation Reference
- index.js:611-631 (handler)The handler function that executes the strapi_list_tutorials tool. It makes a GET request to Strapi's content-manager API for tutorials with pagination parameters and returns the JSON response.async listTutorials (headers, args = {}) { const { page = 1, pageSize = 25 } = args const response = await axios.get( `${this.strapiUrl}/content-manager/collection-types/api::tutorial.tutorial`, { headers, params: { page, pageSize } } ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } }
- index.js:222-236 (schema)The input schema definition for the strapi_list_tutorials tool, registered in the ListTools response.{ name: 'strapi_list_tutorials', description: 'List all tutorials with filtering and pagination', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number', default: 1 }, pageSize: { type: 'number', description: 'Results per page', default: 25 }, status: { type: 'string', enum: ['published', 'draft', 'all'], description: 'Filter by status', default: 'all' }, difficulty: { type: 'string', enum: ['beginner', 'intermediate', 'advanced'], description: 'Filter by difficulty' }, category_id: { type: 'number', description: 'Filter by category ID' }, sort: { type: 'string', description: 'Sort field and direction', default: 'createdAt:desc' } } } },
- index.js:393-394 (registration)The switch case in the CallToolRequest handler that dispatches to the listTutorials method for this tool.case 'strapi_list_tutorials': return await this.listTutorials(headers, request.params.arguments)