info
Retrieve system information from the Meilisearch server to monitor its status and configuration.
Instructions
Get the system information of the Meilisearch server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/system-tools.ts:54-68 (registration)Registers the 'info' tool on the MCP server. The tool has no input parameters (empty schema) and its handler fetches system information from the Meilisearch root endpoint ('/') using apiClient.get('/'), stringifies the JSON response, and handles errors with createErrorResponse.server.tool( 'info', 'Get the system information of the Meilisearch server', {}, async () => { try { const response = await apiClient.get('/'); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
- src/tools/system-tools.ts:58-67 (handler)The inline handler function for the 'info' tool that executes the core logic: calls the Meilisearch API root endpoint and returns the system info as formatted JSON text content.async () => { try { const response = await apiClient.get('/'); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
- src/index.ts:69-69 (registration)Top-level call to registerSystemTools(server), which includes registration of the 'info' tool among other system tools.registerSystemTools(server);