Skip to main content
Glama
meilisearch

Meilisearch MCP Server

Official
by meilisearch

get-settings

Retrieve current configuration settings for a specific index in Meilisearch, ensuring accurate management and updates to search functionalities.

Instructions

Get current settings for an index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYes

Implementation Reference

  • Handler for the 'get-settings' MCP tool: retrieves the index settings via the SettingsManager and formats the response as text content.
    elif name == "get-settings":
        settings = self.meili_client.settings.get_settings(
            arguments["indexUid"]
        )
        return [
            types.TextContent(
                type="text", text=f"Current settings: {settings}"
            )
        ]
  • Registration of the 'get-settings' tool in the list_tools handler, including its input schema requiring 'indexUid'.
    types.Tool(
        name="get-settings",
        description="Get current settings for an index",
        inputSchema={
            "type": "object",
            "properties": {"indexUid": {"type": "string"}},
            "required": ["indexUid"],
            "additionalProperties": False,
        },
    ),
  • Implementation of get_settings method in SettingsManager class, which calls the Meilisearch SDK to retrieve index settings.
    def get_settings(self, index_uid: str) -> Dict[str, Any]:
        """Get all settings for an index"""
        try:
            index = self.client.index(index_uid)
            return index.get_settings()
        except Exception as e:
            raise Exception(f"Failed to get settings: {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