Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

delete-index

Remove a Meilisearch index by specifying its unique identifier to free up resources and manage your search database structure.

Instructions

Delete a Meilisearch index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index to delete

Implementation Reference

  • The handler function for the 'delete-index' tool. It deletes the specified index using the apiClient and returns the response or handles errors.
    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 input schema for the 'delete-index' tool requiring indexUid.
    { indexUid: z.string().describe('Unique identifier of the index to delete'), },
  • Module-level registration of the 'delete-index' tool using server.tool() including 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 interface defining the input parameters for the delete-index handler.
    interface DeleteIndexParams { indexUid: string; }
  • src/index.ts:64-64 (registration)
    Top-level registration call that invokes the index tools registration, including 'delete-index'.
    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