Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

list-tasks

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

Instructions

List tasks with optional filtering

Input Schema

TableJSON 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

Implementation Reference

  • The handler function that implements the list-tasks tool logic: constructs query params from inputs, calls apiClient.get('/tasks'), formats response as JSON text, handles errors.
    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 input parameters for the list-tasks tool.
    {
      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"),
    },
  • Direct registration of the list-tasks tool on the MCP server, including name, description, input schema, and 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);
        }
      }
    );
  • src/index.ts:70-70 (registration)
    Top-level registration call that invokes registerTaskTools(server), thereby registering the list-tasks tool among others.
    registerTaskTools(server);
  • TypeScript interface defining parameters for list-tasks, matching the schema and used for type annotation in handler.
    interface ListTasksParams {
      limit?: number;
      from?: number;
      statuses?: string[];
      types?: string[];
      indexUids?: string[];
      uids?: number[];
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose whether this is a read-only operation, how results are returned (pagination, ordering), rate limits, authentication requirements, or what happens when no filters are applied. 'List tasks' implies safe reading, but no behavioral details are given.

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 wasted words. It's appropriately sized for a list operation and front-loads the core purpose. Every word earns its place.

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?

For a tool with 6 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain return format, pagination behavior, error conditions, or how filtering works in practice. The agent lacks context about what 'tasks' represent in this system despite the rich parameter schema.

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 6 parameters. The description adds minimal value by mentioning 'optional filtering' which aligns with the schema's optional parameters. This meets the baseline for high schema coverage without adding meaningful parameter context beyond what's already structured.

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 'List tasks with optional filtering' clearly states the verb ('List') and resource ('tasks'), but it's vague about scope and doesn't distinguish from sibling tools like 'get-tasks' or 'get-task'. It provides basic purpose but lacks specificity about what kind of tasks or system context.

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 like 'get-tasks' or 'get-task'. There's no mention of prerequisites, context, or comparison with sibling tools. The agent must infer usage from the name alone.

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