Skip to main content
Glama
meilisearch

Meilisearch MCP Server

Official
by meilisearch

get-task

Retrieve detailed information about a specific task in Meilisearch by providing its unique task identifier (taskUid). Use this tool to monitor task progress and status updates.

Instructions

Get information about a specific task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskUidYes

Implementation Reference

  • Handler logic for the 'get-task' tool within the handle_call_tool function. Retrieves task information using the Meilisearch client and returns it as text content.
    elif name == "get-task":
        task = self.meili_client.tasks.get_task(arguments["taskUid"])
        return [
            types.TextContent(type="text", text=f"Task information: {task}")
        ]
  • Registration of the 'get-task' tool in the list_tools handler, including name, description, and input schema.
    types.Tool(
        name="get-task",
        description="Get information about a specific task",
        inputSchema={
            "type": "object",
            "properties": {"taskUid": {"type": "integer"}},
            "required": ["taskUid"],
            "additionalProperties": False,
        },
    ),
  • TaskManager.get_task helper method that wraps the Meilisearch client's get_task and serializes the result.
    def get_task(self, task_uid: int) -> Dict[str, Any]:
        """Get information about a specific task"""
        try:
            task = self.client.get_task(task_uid)
            return serialize_task_results(task)
        except Exception as e:
            raise Exception(f"Failed to get task: {str(e)}")

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/meilisearch/meilisearch-mcp'

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