Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-task

Retrieve detailed status and progress information for a specific Meilisearch task using its unique identifier to monitor indexing or operation completion.

Instructions

Get information about a specific task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskUidYesUnique identifier of the task

Implementation Reference

  • The handler function that implements the core logic of the 'get-task' tool. It makes an API call to retrieve details of the specified task and returns the result as formatted JSON or an error response.
    async ({ taskUid }: GetTaskParams) => {
      try {
        const response = await apiClient.get(`/tasks/${taskUid}`);
        return {
          content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }],
        };
      } catch (error) {
        return createErrorResponse(error);
      }
    }
  • Zod schema for validating the input parameters of the 'get-task' tool, specifically requiring a 'taskUid' number.
    {
      taskUid: z.number().describe("Unique identifier of the task"),
    },
  • TypeScript interface defining the expected parameters for the 'get-task' tool handler.
    interface GetTaskParams {
      taskUid: number;
    }
  • The registration of the 'get-task' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      "get-task",
      "Get information about a specific task",
      {
        taskUid: z.number().describe("Unique identifier of the task"),
      },
      async ({ taskUid }: GetTaskParams) => {
        try {
          const response = await apiClient.get(`/tasks/${taskUid}`);
          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 the task tools module, which includes the 'get-task' tool.
    registerTaskTools(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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

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