Skip to main content
Glama

strapi_list_events

Retrieve and filter events from Strapi CMS with pagination, status filtering, and sorting options to manage event listings efficiently.

Instructions

List all events with filtering and pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number
pageSizeNoResults per page
statusNoFilter by statusall
event_typeNoFilter by event type
upcomingNoShow only upcoming events
sortNoSort field and directionstart_date:asc

Implementation Reference

  • The main handler function that fetches the list of events from Strapi's content manager API endpoint using axios GET request, supporting pagination via page and pageSize parameters, and returns the JSON response.
    async listEvents (headers, args = {}) { const { page = 1, pageSize = 25 } = args const response = await axios.get( `${this.strapiUrl}/content-manager/collection-types/api::event.event`, { headers, params: { page, pageSize } } ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } }
  • Defines the input schema, description, and parameters for the strapi_list_events tool in the ListTools response.
    { name: 'strapi_list_events', description: 'List all events with filtering and pagination', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number', default: 1 }, pageSize: { type: 'number', description: 'Results per page', default: 25 }, status: { type: 'string', enum: ['published', 'draft', 'all'], description: 'Filter by status', default: 'all' }, event_type: { type: 'string', enum: ['webinar', 'workshop', 'meetup', 'conference'], description: 'Filter by event type' }, upcoming: { type: 'boolean', description: 'Show only upcoming events', default: false }, sort: { type: 'string', description: 'Sort field and direction', default: 'start_date:asc' } } } },
  • index.js:409-410 (registration)
    Registers the listEvents handler function for the strapi_list_events tool call in the switch statement within CallToolRequest handler.
    case 'strapi_list_events': return await this.listEvents(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