delete-index
Remove a specified Meilisearch index using its unique identifier (UID) to manage search data effectively.
Instructions
Delete a Meilisearch index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes |
Implementation Reference
- src/meilisearch_mcp/server.py:506-513 (handler)MCP tool handler for 'delete-index': executes deletion via IndexManager and returns success confirmation.elif name == "delete-index": result = self.meili_client.indexes.delete_index(arguments["uid"]) return [ types.TextContent( type="text", text=f"Successfully deleted index: {arguments['uid']}", ) ]
- src/meilisearch_mcp/server.py:145-154 (registration)Registers the 'delete-index' tool in the list_tools handler, including its description and input schema (requires 'uid' string).types.Tool( name="delete-index", description="Delete a Meilisearch index", inputSchema={ "type": "object", "properties": {"uid": {"type": "string"}}, "required": ["uid"], "additionalProperties": False, }, ),
- src/meilisearch_mcp/indexes.py:43-48 (helper)IndexManager helper method that wraps the official Meilisearch client's delete_index(uid).def delete_index(self, uid: str) -> Dict[str, Any]: """Delete an index""" try: return self.client.delete_index(uid) except Exception as e: raise Exception(f"Failed to delete index: {str(e)}")