Skip to main content
Glama

strapi_update_tutorial

Modify existing tutorial content in Strapi CMS by updating title, description, difficulty level, duration, or markdown content using document ID.

Instructions

Update an existing tutorial

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesTutorial document ID
titleNoNew title
contentNoNew content in MARKDOWN
descriptionNoNew description
difficultyNoNew difficulty
durationNoNew duration in minutes

Implementation Reference

  • The core handler function that executes the tool logic by constructing update data from arguments and sending a PUT request to Strapi's tutorial endpoint.
    async updateTutorial (headers, args) { const data = {} if (args.title) data.title = args.title if (args.content) data.content = args.content if (args.description) data.description = args.description if (args.difficulty) data.difficulty = args.difficulty if (args.duration) data.duration = args.duration const response = await axios.put( `${this.strapiUrl}/content-manager/collection-types/api::tutorial.tutorial/${args.document_id}`, data, { headers } ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] }
  • Input schema defining the parameters for the strapi_update_tutorial tool, including required document_id and optional fields for update.
    inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Tutorial document ID' }, title: { type: 'string', description: 'New title' }, content: { type: 'string', description: 'New content in MARKDOWN' }, description: { type: 'string', description: 'New description' }, difficulty: { type: 'string', enum: ['beginner', 'intermediate', 'advanced'], description: 'New difficulty' }, duration: { type: 'number', description: 'New duration in minutes' } }, required: ['document_id']
  • index.js:248-262 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema for strapi_update_tutorial.
    { name: 'strapi_update_tutorial', description: 'Update an existing tutorial', inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Tutorial document ID' }, title: { type: 'string', description: 'New title' }, content: { type: 'string', description: 'New content in MARKDOWN' }, description: { type: 'string', description: 'New description' }, difficulty: { type: 'string', enum: ['beginner', 'intermediate', 'advanced'], description: 'New difficulty' }, duration: { type: 'number', description: 'New duration in minutes' } }, required: ['document_id'] }
  • index.js:399-400 (registration)
    Handler dispatch registration in the CallToolRequest switch statement, mapping the tool name to the updateTutorial method.
    case 'strapi_update_tutorial': return await this.updateTutorial(headers, request.params.arguments)

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/AINative-Studio/ainative-strapi-mcp-server'

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