Skip to main content
Glama
meilisearch

Meilisearch MCP Server

Official
by meilisearch

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

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • 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}")]
  • 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,
    },
  • 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)}")
  • Initializes the KeyManager instance on the MeilisearchClient.
    self.keys = KeyManager(self.client)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get list of API keys', implying a read-only operation, but doesn't disclose any behavioral traits like authentication requirements, rate limits, pagination behavior (implied by limit/offset params but not explained), or what the returned list includes. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with a single sentence, 'Get list of API keys', which is front-loaded and wastes no words. However, it might be overly brief given the lack of other context, but it efficiently states the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a read operation with pagination parameters), no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain the return values, pagination behavior, or any constraints, making it inadequate for an agent to use the tool correctly without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 2 parameters (limit, offset) with 0% description coverage, meaning the schema provides no semantic information. The description 'Get list of API keys' doesn't mention or explain these parameters at all, failing to compensate for the lack of schema documentation. This leaves the agent guessing about the purpose and usage of limit and offset.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get list of API keys' clearly states the verb ('Get') and resource ('API keys'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'create-key' or 'delete-key' beyond the basic action, and it lacks specificity about scope or format of the returned list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions, such as whether it requires authentication or how it relates to sibling tools like 'create-key' or 'delete-key'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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