Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-tasks

Retrieve task details from Meilisearch MCP Server with options to filter by status, type, index UIDs, limit, and starting task UID.

Instructions

Get information about tasks with optional filtering

Input Schema

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

Implementation Reference

  • The handler function for the 'get-tasks' tool. It constructs query parameters from the input arguments and makes a GET request to the Meilisearch '/tasks' 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); } }
  • Input schema using Zod for validating optional parameters: 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'), },
  • Registration of the 'get-tasks' MCP tool using server.tool(), including 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); } } );
  • src/index.ts:69-69 (registration)
    Top-level call to registerSystemTools on the MCP server instance, which registers the 'get-tasks' tool among others.
    registerSystemTools(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/devlimelabs/meilisearch-ts-mcp'

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