strapi_get_tutorial
Retrieve a specific tutorial from Strapi CMS using its document ID for content management and reference.
Instructions
Get a specific tutorial by document ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | Tutorial document ID |
Implementation Reference
- index.js:633-645 (handler)The main handler function that retrieves a specific tutorial by its document ID using a GET request to Strapi's content-manager API and returns the JSON response.async getTutorial (headers, args) { const response = await axios.get( `${this.strapiUrl}/content-manager/collection-types/api::tutorial.tutorial/${args.document_id}`, { headers } ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } }
- index.js:240-246 (schema)Input schema defining the required 'document_id' parameter for the tool.inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Tutorial document ID' } }, required: ['document_id'] }
- index.js:237-247 (registration)Tool registration in the listTools response, including name, description, and schema.{ name: 'strapi_get_tutorial', description: 'Get a specific tutorial by document ID', inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Tutorial document ID' } }, required: ['document_id'] } },
- index.js:396-397 (registration)Switch case in the CallToolRequest handler that dispatches to the getTutorial method.case 'strapi_get_tutorial': return await this.getTutorial(headers, request.params.arguments)