Skip to main content
Glama

strapi_create_event

Create new events in Strapi CMS by specifying title, description, type, dates, and location for webinars, workshops, meetups, or conferences.

Instructions

Create a new event (webinar, workshop, meetup, conference)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesEvent title
descriptionYesEvent description in MARKDOWN
event_typeYesType of event
start_dateYesEvent start date/time (ISO 8601)
end_dateNoEvent end date/time (ISO 8601)
locationNoPhysical location or virtual platform
registration_urlNoRegistration/signup URL
max_attendeesNoMaximum number of attendees
publishedAtNoPublication date (ISO 8601) or null for draft

Implementation Reference

  • The main handler function that executes the tool logic: constructs event data from arguments and sends a POST request to Strapi's event collection endpoint to create the event.
    async createEvent (headers, args) {
      const data = {
        title: args.title,
        description: args.description,
        event_type: args.event_type,
        start_date: args.start_date,
        end_date: args.end_date,
        location: args.location,
        registration_url: args.registration_url,
        max_attendees: args.max_attendees,
        publishedAt: args.publishedAt || null
      }
    
      const response = await axios.post(
        `${this.strapiUrl}/content-manager/collection-types/api::event.event`,
        data,
        { headers }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
  • Defines the input schema for the strapi_create_event tool, specifying parameters, types, descriptions, and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        title: { type: 'string', description: 'Event title' },
        description: { type: 'string', description: 'Event description in MARKDOWN' },
        event_type: { type: 'string', enum: ['webinar', 'workshop', 'meetup', 'conference'], description: 'Type of event' },
        start_date: { type: 'string', description: 'Event start date/time (ISO 8601)' },
        end_date: { type: 'string', description: 'Event end date/time (ISO 8601)' },
        location: { type: 'string', description: 'Physical location or virtual platform' },
        registration_url: { type: 'string', description: 'Registration/signup URL' },
        max_attendees: { type: 'number', description: 'Maximum number of attendees' },
        publishedAt: { type: 'string', description: 'Publication date (ISO 8601) or null for draft' }
      },
      required: ['title', 'description', 'event_type', 'start_date']
    }
  • index.js:278-295 (registration)
    Registers the strapi_create_event tool in the listTools response, including name, description, and input schema.
      name: 'strapi_create_event',
      description: 'Create a new event (webinar, workshop, meetup, conference)',
      inputSchema: {
        type: 'object',
        properties: {
          title: { type: 'string', description: 'Event title' },
          description: { type: 'string', description: 'Event description in MARKDOWN' },
          event_type: { type: 'string', enum: ['webinar', 'workshop', 'meetup', 'conference'], description: 'Type of event' },
          start_date: { type: 'string', description: 'Event start date/time (ISO 8601)' },
          end_date: { type: 'string', description: 'Event end date/time (ISO 8601)' },
          location: { type: 'string', description: 'Physical location or virtual platform' },
          registration_url: { type: 'string', description: 'Registration/signup URL' },
          max_attendees: { type: 'number', description: 'Maximum number of attendees' },
          publishedAt: { type: 'string', description: 'Publication date (ISO 8601) or null for draft' }
        },
        required: ['title', 'description', 'event_type', 'start_date']
      }
    },
  • index.js:406-407 (registration)
    Registers the handler dispatch in the CallToolRequestSchema switch statement, mapping the tool name to the createEvent method.
    case 'strapi_create_event':
      return await this.createEvent(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