delete-key
Remove an API key from the Meilisearch MCP Server to ensure secure access control and manage user permissions effectively.
Instructions
Delete an API key
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes |
Implementation Reference
- src/meilisearch_mcp/server.py:666-673 (handler)Handler for the 'delete-key' tool: calls meili_client.keys.delete_key with the provided key and returns a success message.elif name == "delete-key": self.meili_client.keys.delete_key(arguments["key"]) return [ types.TextContent( type="text", text=f"Successfully deleted API key: {arguments['key']}", ) ]
- Input schema definition for the 'delete-key' tool, requiring a 'key' parameter.types.Tool( name="delete-key", description="Delete an API key", inputSchema={ "type": "object", "properties": {"key": {"type": "string"}}, "required": ["key"], "additionalProperties": False, }, ),
- src/meilisearch_mcp/keys.py:40-45 (helper)KeyManager helper method that wraps the Meilisearch client's delete_key method with error handling.def delete_key(self, key: str) -> None: """Delete an API key""" try: return self.client.delete_key(key) except Exception as e: raise Exception(f"Failed to delete key: {str(e)}")