Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

list-tasks

Retrieve and filter tasks from Meilisearch to monitor operations like indexing, document updates, and settings changes.

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

  • Handler function that implements the core logic of the 'list-tasks' tool by building query parameters and fetching tasks from the Meilisearch API.
    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 and validation 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"),
    },
  • Registers the 'list-tasks' tool on the MCP server, including name, description, input schema, and handler function.
      "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 call to register all task management tools, including 'list-tasks', on the main MCP server instance.
    registerTaskTools(server);
  • TypeScript interface defining the parameter types used in the 'list-tasks' 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 for behavioral disclosure. 'List tasks with optional filtering' implies a read operation but doesn't specify pagination behavior, default ordering, rate limits, authentication requirements, or what happens when no filters are applied. This is inadequate for a tool with 6 parameters and no output schema.

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 extremely concise at just 5 words. It's front-loaded with the core purpose and wastes no words. Every word earns its place, making it efficient despite being under-specified.

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 insufficiently complete. It doesn't explain what 'list' means operationally, how results are structured, or provide any behavioral context. The agent would struggle to use this effectively without trial and error.

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 no parameter-specific information beyond mentioning 'optional filtering' in general terms. This meets the baseline of 3 when schema does the heavy lifting, but adds no meaningful semantic context.

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' states the basic purpose (list tasks) and mentions filtering capability, but it's vague about scope and doesn't distinguish from sibling tools like 'get-tasks' or 'get-task'. It provides a minimal viable description without specific differentiation.

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, typical use cases, or exclusions. The agent must infer usage from the tool 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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

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