Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

delete-index

Remove a Meilisearch index by its unique identifier to manage search data and free up resources.

Instructions

Delete a Meilisearch index

Input Schema

NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index to delete

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "indexUid": { "description": "Unique identifier of the index to delete", "type": "string" } }, "required": [ "indexUid" ], "type": "object" }

Implementation Reference

  • The async handler function that performs the actual deletion of the specified Meilisearch index using the apiClient.
    async ({ indexUid }: DeleteIndexParams) => { try { const response = await apiClient.delete(`/indexes/${indexUid}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
  • Zod schema defining the input parameters for the 'delete-index' tool.
    { indexUid: z.string().describe('Unique identifier of the index to delete'), },
  • MCP server.tool registration for the 'delete-index' tool, including description, schema, and handler.
    server.tool( 'delete-index', 'Delete a Meilisearch index', { indexUid: z.string().describe('Unique identifier of the index to delete'), }, async ({ indexUid }: DeleteIndexParams) => { try { const response = await apiClient.delete(`/indexes/${indexUid}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
  • TypeScript type definition for the parameters used in the delete-index handler.
    interface DeleteIndexParams { indexUid: string; }
  • src/index.ts:64-64 (registration)
    Top-level call to register all index tools, including 'delete-index', on the MCP server.
    registerIndexTools(server);

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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server