Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

list-tasks

Retrieve and filter tasks from Meilisearch to monitor indexing operations, document updates, and system activities with status and type parameters.

Instructions

List tasks with optional filtering

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of tasks to return
fromNoTask uid from which to start fetching
statusesNoStatuses of tasks to return
typesNoTypes of tasks to return
indexUidsNoUIDs of the indexes on which tasks were performed
uidsNoUIDs of specific tasks to return

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "from": { "description": "Task uid from which to start fetching", "minimum": 0, "type": "number" }, "indexUids": { "description": "UIDs of the indexes on which tasks were performed", "items": { "type": "string" }, "type": "array" }, "limit": { "description": "Maximum number of tasks to return", "minimum": 0, "type": "number" }, "statuses": { "description": "Statuses of tasks to return", "items": { "enum": [ "enqueued", "processing", "succeeded", "failed", "canceled" ], "type": "string" }, "type": "array" }, "types": { "description": "Types of tasks to return", "items": { "enum": [ "indexCreation", "indexUpdate", "indexDeletion", "documentAddition", "documentUpdate", "documentDeletion", "settingsUpdate", "dumpCreation", "taskCancelation" ], "type": "string" }, "type": "array" }, "uids": { "description": "UIDs of specific tasks to return", "items": { "type": "number" }, "type": "array" } }, "type": "object" }

Implementation Reference

  • Handler function that constructs query parameters based on input filters, calls the Meilisearch '/tasks' API, and returns the tasks as formatted JSON or an error response.
    async ({ limit, from, statuses, types, indexUids, uids }: ListTasksParams) => { try { const params: Record<string, any> = {}; if (limit !== undefined) params.limit = limit; if (from !== undefined) params.from = from; if (statuses && statuses.length > 0) params.statuses = statuses.join(','); if (types && types.length > 0) params.types = types.join(','); if (indexUids && indexUids.length > 0) params.indexUids = indexUids.join(','); if (uids && uids.length > 0) params.uids = uids.join(','); const response = await apiClient.get('/tasks', { params }); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
  • Zod schema defining the input parameters for the list-tasks tool, including optional filters for limit, offset, statuses, types, indexUids, and uids.
    { limit: z.number().min(0).optional().describe("Maximum number of tasks to return"), from: z.number().min(0).optional().describe("Task uid from which to start fetching"), statuses: z.array(z.enum(["enqueued", "processing", "succeeded", "failed", "canceled"])).optional().describe("Statuses of tasks to return"), types: z.array(z.enum(["indexCreation", "indexUpdate", "indexDeletion", "documentAddition", "documentUpdate", "documentDeletion", "settingsUpdate", "dumpCreation", "taskCancelation"])).optional().describe("Types of tasks to return"), indexUids: z.array(z.string()).optional().describe("UIDs of the indexes on which tasks were performed"), uids: z.array(z.number()).optional().describe("UIDs of specific tasks to return"), },
  • Registers the list-tasks tool with the MCP server, including description, input schema, and inline handler function.
    server.tool( "list-tasks", "List tasks with optional filtering", { limit: z.number().min(0).optional().describe("Maximum number of tasks to return"), from: z.number().min(0).optional().describe("Task uid from which to start fetching"), statuses: z.array(z.enum(["enqueued", "processing", "succeeded", "failed", "canceled"])).optional().describe("Statuses of tasks to return"), types: z.array(z.enum(["indexCreation", "indexUpdate", "indexDeletion", "documentAddition", "documentUpdate", "documentDeletion", "settingsUpdate", "dumpCreation", "taskCancelation"])).optional().describe("Types of tasks to return"), indexUids: z.array(z.string()).optional().describe("UIDs of the indexes on which tasks were performed"), uids: z.array(z.number()).optional().describe("UIDs of specific tasks to return"), }, async ({ limit, from, statuses, types, indexUids, uids }: ListTasksParams) => { try { const params: Record<string, any> = {}; if (limit !== undefined) params.limit = limit; if (from !== undefined) params.from = from; if (statuses && statuses.length > 0) params.statuses = statuses.join(','); if (types && types.length > 0) params.types = types.join(','); if (indexUids && indexUids.length > 0) params.indexUids = indexUids.join(','); if (uids && uids.length > 0) params.uids = uids.join(','); const response = await apiClient.get('/tasks', { params }); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
  • TypeScript interface used to type the parameters destructured in the list-tasks handler function.
    interface ListTasksParams { limit?: number; from?: number; statuses?: string[]; types?: string[]; indexUids?: string[]; uids?: number[]; }
  • src/index.ts:70-70 (registration)
    Top-level call to registerTaskTools on the MCP server instance, which includes the list-tasks tool among others.
    registerTaskTools(server);

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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

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