Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-tasks

Retrieve and filter task information from Meilisearch to monitor indexing, document updates, and other operations with status and type parameters.

Instructions

Get information about tasks with optional filtering

Input Schema

TableJSON 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

Implementation Reference

  • The handler function that executes the 'get-tasks' tool logic. It builds query parameters from the input and fetches tasks from the Meilisearch /tasks endpoint using apiClient, returning a formatted text response or 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'),
    },
  • MCP server.tool registration for 'get-tasks', including name, description, input schema, and inline handler function.
    server.tool(
      '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);
        }
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'optional filtering' but doesn't disclose behavioral traits like pagination behavior (implied by 'limit' and 'from' parameters), whether this is a read-only operation, authentication requirements, rate limits, or what the return format looks like. For a tool with 5 parameters and no output schema, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, clearly stating the core function without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the return values, pagination behavior, or how filtering interacts with sibling tools. For a data retrieval tool with multiple filtering options, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters with descriptions and enums. The description adds no parameter semantics beyond what's in the schema, merely stating 'optional filtering' which is already clear from the parameter names. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get information about tasks with optional filtering' states the basic purpose (retrieving task data) but is vague about scope and resource. It doesn't specify whether this retrieves all tasks, recent tasks, or tasks from specific contexts, nor does it differentiate from sibling tools like 'get-task' (singular) or 'list-tasks' which might serve similar purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get-task' (singular), 'list-tasks', and 'cancel-tasks', there's no indication of when filtering is needed, whether this is for bulk operations, or any prerequisites. Usage is implied only through the mention of 'optional filtering'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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