ollama_status
Check the reachability of the Ollama server and retrieve its version, enabling you to confirm connectivity before using other tools.
Instructions
Health check: whether the Ollama server is reachable and its version. Use this as a precondition before other tools if you're unsure whether Ollama is running.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:117-127 (handler)The ollamaStatus function that implements the 'ollama_status' tool. It performs a health check by making GET requests to '/' and '/api/version' endpoints, returning whether the server is reachable, the root message, and the Ollama version.
async function ollamaStatus() { const root = await httpRequest('GET', '/'); if (root.error) return errorResult(root.error); const ver = await httpRequest('GET', '/api/version'); return textResult({ url: OLLAMA_URL, reachable: true, root_message: root.text || (root.data ? JSON.stringify(root.data) : ''), version: ver.data?.version || null, }); } - server.js:277-281 (registration)Tool registration entry for 'ollama_status' in the TOOLS array, defining its name, description, annotations, and input schema (no parameters needed).
name: 'ollama_status', description: 'Health check: whether the Ollama server is reachable and its version. Use this as a precondition before other tools if you\'re unsure whether Ollama is running.', annotations: { title: 'Ollama server status', readOnlyHint: true, destructiveHint: false, openWorldHint: false }, inputSchema: { type: 'object', properties: {}, additionalProperties: false }, }, - server.js:386-386 (registration)The HANDLERS mapping that connects the tool name 'ollama_status' to the ollamaStatus function for dispatch.
ollama_status: ollamaStatus,