update-settings
Modify index settings in Meilisearch by specifying the index UID and new configurations to customize search behavior and performance.
Instructions
Update settings for an index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indexUid | Yes | ||
| settings | Yes |
Implementation Reference
- src/meilisearch_mcp/server.py:577-585 (handler)MCP tool handler that executes the update-settings logic by calling the settings manager's update_settings method.elif name == "update-settings": result = self.meili_client.settings.update_settings( arguments["indexUid"], arguments["settings"] ) return [ types.TextContent( type="text", text=f"Settings updated: {result}" ) ]
- Input schema definition for the update-settings tool, specifying indexUid and settings object.types.Tool( name="update-settings", description="Update settings for an index", inputSchema={ "type": "object", "properties": { "indexUid": {"type": "string"}, "settings": { "type": "object", "additionalProperties": True, }, }, "required": ["indexUid", "settings"], "additionalProperties": False, }, ),
- src/meilisearch_mcp/server.py:199-214 (registration)Registration of the update-settings tool in the list_tools handler.types.Tool( name="update-settings", description="Update settings for an index", inputSchema={ "type": "object", "properties": { "indexUid": {"type": "string"}, "settings": { "type": "object", "additionalProperties": True, }, }, "required": ["indexUid", "settings"], "additionalProperties": False, }, ),
- Helper method in SettingsManager that wraps the Meilisearch client's index.update_settings call.def update_settings( self, index_uid: str, settings: Dict[str, Any] ) -> Dict[str, Any]: """Update settings for an index""" try: index = self.client.index(index_uid) return index.update_settings(settings) except Exception as e: raise Exception(f"Failed to update settings: {str(e)}")