get-task
Retrieve detailed information about a specific task by providing its unique identifier, aiding in tracking and managing task status within the Meilisearch MCP Server.
Instructions
Get information about a specific task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskUid | Yes | Unique identifier of the task |
Implementation Reference
- src/tools/task-tools.ts:85-94 (handler)The handler function that fetches the specific task information from the Meilisearch API using the provided taskUid and returns it as JSON.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/tools/task-tools.ts:82-84 (schema)Zod input schema for the get-task tool, defining the required taskUid parameter.{ taskUid: z.number().describe("Unique identifier of the task"), },
- src/tools/task-tools.ts:23-25 (schema)TypeScript interface defining the parameters for the get-task handler.interface GetTaskParams { taskUid: number; }
- src/tools/task-tools.ts:80-95 (registration)Registers the 'get-task' tool on the MCP server, specifying name, description, input schema, and handler function."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 all task tools, including 'get-task', on the main MCP server instance.registerTaskTools(server);