health
Check if the Meilisearch server is running and responding to requests. Use this tool to verify server availability and operational status.
Instructions
Check if the Meilisearch server is healthy
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/system-tools.ts:24-33 (handler)Handler function that fetches the health status from Meilisearch server via apiClient.get('/health') and returns the JSON response or an error response.async () => { try { const response = await apiClient.get('/health'); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
- src/tools/system-tools.ts:20-34 (registration)Registration of the 'health' MCP tool using server.tool() with name 'health', description, empty input schema, and inline handler function.server.tool( 'health', 'Check if the Meilisearch server is healthy', {}, async () => { try { const response = await apiClient.get('/health'); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );