Skip to main content
Glama
meilisearch

Meilisearch MCP Server

Official
by meilisearch

cancel-tasks

Cancel tasks in Meilisearch by applying filters such as uids, indexUids, types, or statuses to manage task execution efficiently.

Instructions

Cancel tasks based on filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidsNo
statusesNo
typesNo
uidsNo

Implementation Reference

  • MCP tool call handler dispatch for 'cancel-tasks': calls the MeilisearchClient's tasks.cancel_tasks method with the provided arguments and returns the result as text content.
    elif name == "cancel-tasks": result = self.meili_client.tasks.cancel_tasks(arguments) return [ types.TextContent( type="text", text=f"Tasks cancelled: {result}" ) ]
  • Registration of the 'cancel-tasks' tool in the MCP server's list_tools handler, including its description and input schema.
    types.Tool( name="cancel-tasks", description="Cancel tasks based on filters", inputSchema={ "type": "object", "properties": { "uids": {"type": "string"}, "indexUids": {"type": "string"}, "types": {"type": "string"}, "statuses": {"type": "string"}, }, "additionalProperties": False, }, ),
  • TaskManager.cancel_tasks method: wraps the underlying Meilisearch client's cancel_tasks call, serializes the result, and handles exceptions.
    def cancel_tasks(self, query_parameters: Dict[str, Any]) -> Dict[str, Any]: """Cancel tasks based on query parameters""" try: result = self.client.cancel_tasks(query_parameters) return serialize_task_results(result) except Exception as e: raise Exception(f"Failed to cancel tasks: {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