Skip to main content
Glama

strapi_update_event

Modify existing event details in Strapi CMS by updating title, description, dates, location, or registration URL using the event document ID.

Instructions

Update an existing event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesEvent document ID
titleNoNew title
descriptionNoNew description
start_dateNoNew start date/time
end_dateNoNew end date/time
locationNoNew location
registration_urlNoNew registration URL

Implementation Reference

  • Handler function that updates a Strapi event by sending a PUT request to the content-manager API with the provided arguments, constructing the data object conditionally.
    async updateEvent (headers, args) { const data = {} if (args.title) data.title = args.title if (args.description) data.description = args.description if (args.start_date) data.start_date = args.start_date if (args.end_date) data.end_date = args.end_date if (args.location) data.location = args.location if (args.registration_url) data.registration_url = args.registration_url const response = await axios.put( `${this.strapiUrl}/content-manager/collection-types/api::event.event/${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_event tool, including required document_id and optional fields for updating the event.
    inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Event document ID' }, title: { type: 'string', description: 'New title' }, description: { type: 'string', description: 'New description' }, start_date: { type: 'string', description: 'New start date/time' }, end_date: { type: 'string', description: 'New end date/time' }, location: { type: 'string', description: 'New location' }, registration_url: { type: 'string', description: 'New registration URL' } }, required: ['document_id'] }
  • index.js:322-338 (registration)
    Tool registration in the tools array, including name, description, and input schema.
    { name: 'strapi_update_event', description: 'Update an existing event', inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Event document ID' }, title: { type: 'string', description: 'New title' }, description: { type: 'string', description: 'New description' }, start_date: { type: 'string', description: 'New start date/time' }, end_date: { type: 'string', description: 'New end date/time' }, location: { type: 'string', description: 'New location' }, registration_url: { type: 'string', description: 'New registration URL' } }, required: ['document_id'] } },
  • index.js:415-417 (registration)
    Dispatch case in setupHandlers switch statement that routes the tool call to the updateEvent handler.
    case 'strapi_update_event': return await this.updateEvent(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