Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-tasks

Retrieve and filter task information from Meilisearch, including status, type, and index associations for monitoring operations.

Instructions

Get information about tasks with optional filtering

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of tasks to return
fromNoTask uid from which to start fetching
statusNoStatus of tasks to return
typeNoType of tasks to return
indexUidsNoUIDs of the indexes on which tasks were performed

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" }, "status": { "description": "Status of tasks to return", "enum": [ "enqueued", "processing", "succeeded", "failed", "canceled" ], "type": "string" }, "type": { "description": "Type of tasks to return", "enum": [ "indexCreation", "indexUpdate", "indexDeletion", "documentAddition", "documentUpdate", "documentDeletion", "settingsUpdate", "dumpCreation", "taskCancelation" ], "type": "string" } }, "type": "object" }

Implementation Reference

  • The handler function for the 'get-tasks' tool. It constructs query parameters from the input and calls the Meilisearch /tasks API endpoint, returning the JSON response or an error.
    async ({ limit, from, status, type, indexUids }) => { try { const params: Record<string, any> = {}; if (limit !== undefined) params.limit = limit; if (from !== undefined) params.from = from; if (status) params.status = status; if (type) params.type = type; if (indexUids && indexUids.length > 0) params.indexUids = indexUids.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 input schema defining optional parameters for filtering tasks: limit, from, status, type, and indexUids.
    { 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'), status: z.enum(['enqueued', 'processing', 'succeeded', 'failed', 'canceled']).optional().describe('Status of tasks to return'), type: z.enum(['indexCreation', 'indexUpdate', 'indexDeletion', 'documentAddition', 'documentUpdate', 'documentDeletion', 'settingsUpdate', 'dumpCreation', 'taskCancelation']).optional().describe('Type of tasks to return'), indexUids: z.array(z.string()).optional().describe('UIDs of the indexes on which tasks were performed'), },
  • The server.tool call that registers the 'get-tasks' tool, including its name, description, input schema, and handler function.
    'get-tasks', 'Get information about 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'), status: z.enum(['enqueued', 'processing', 'succeeded', 'failed', 'canceled']).optional().describe('Status of tasks to return'), type: z.enum(['indexCreation', 'indexUpdate', 'indexDeletion', 'documentAddition', 'documentUpdate', 'documentDeletion', 'settingsUpdate', 'dumpCreation', 'taskCancelation']).optional().describe('Type of tasks to return'), indexUids: z.array(z.string()).optional().describe('UIDs of the indexes on which tasks were performed'), }, async ({ limit, from, status, type, indexUids }) => { try { const params: Record<string, any> = {}; if (limit !== undefined) params.limit = limit; if (from !== undefined) params.from = from; if (status) params.status = status; if (type) params.type = type; if (indexUids && indexUids.length > 0) params.indexUids = indexUids.join(','); const response = await apiClient.get('/tasks', { params }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );

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