get-keys
Retrieve a list of API keys for the Meilisearch MCP Server to manage access and permissions efficiently using customizable offset and limit parameters.
Instructions
Get list of API keys
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Implementation Reference
- src/meilisearch_mcp/server.py:649-651 (handler)Executes the 'get-keys' tool by calling the MeilisearchClient's keys.get_keys method and returning the formatted result as text content.
elif name == "get-keys": keys = self.meili_client.keys.get_keys(arguments) return [types.TextContent(type="text", text=f"API keys: {keys}")] - src/meilisearch_mcp/server.py:302-313 (registration)Registers the 'get-keys' tool in the MCP server's list_tools handler, defining its name, description, and input schema.
types.Tool( name="get-keys", description="Get list of API keys", inputSchema={ "type": "object", "properties": { "offset": {"type": "integer"}, "limit": {"type": "integer"}, }, "additionalProperties": False, }, ), - Defines the input schema for the 'get-keys' tool, allowing optional offset and limit parameters.
inputSchema={ "type": "object", "properties": { "offset": {"type": "integer"}, "limit": {"type": "integer"}, }, "additionalProperties": False, }, - src/meilisearch_mcp/keys.py:12-17 (helper)KeyManager helper method that wraps the Meilisearch SDK's get_keys call with error handling.
def get_keys(self, parameters: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: """Get list of API keys""" try: return self.client.get_keys(parameters) except Exception as e: raise Exception(f"Failed to get keys: {str(e)}") - src/meilisearch_mcp/client.py:32-32 (helper)Initializes the KeyManager instance on the MeilisearchClient.
self.keys = KeyManager(self.client)