strapi_create_event
Create new events like webinars, workshops, meetups, or conferences in Strapi CMS by providing title, description, type, and start date.
Instructions
Create a new event (webinar, workshop, meetup, conference)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Event title | |
| description | Yes | Event description in MARKDOWN | |
| event_type | Yes | Type of event | |
| start_date | Yes | Event start date/time (ISO 8601) | |
| end_date | No | Event end date/time (ISO 8601) | |
| location | No | Physical location or virtual platform | |
| registration_url | No | Registration/signup URL | |
| max_attendees | No | Maximum number of attendees | |
| publishedAt | No | Publication date (ISO 8601) or null for draft |
Implementation Reference
- index.js:689-714 (handler)The main handler function for strapi_create_event tool. It constructs the event data from input arguments and makes a POST request to Strapi's content-manager API to create a new event in the 'event' collection-type.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) }] } }
- index.js:280-294 (schema)The input schema definition for the strapi_create_event tool, defining properties, 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:277-295 (registration)The tool registration in the ListTools response, including name, description, and inputSchema.{ 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)The dispatch case in the CallToolRequest handler that routes to the createEvent method.case 'strapi_create_event': return await this.createEvent(headers, request.params.arguments)