Skip to main content
Glama

health_check

Check whether the local Ollama service is reachable to ensure your AI workflows remain operational.

Instructions

Check whether the local Ollama service is reachable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'health_check'. Calls the underlying ollama_client.health_check() and returns a dict with reachability status and base URL.
    async def health_check() -> dict[str, Any]:
        ok = await oc.health_check()
        return {"ollama_reachable": ok, "ollama_base_url": oc.OLLAMA_BASE_URL}
  • The actual implementation that pings the Ollama API root (GET /) to verify reachability. Returns True on HTTP 200, False otherwise.
    async def health_check() -> bool:
        try:
            async with _client(timeout=5) as c:
                r = await c.get("/")
                return r.status_code == 200
        except Exception:
            _log.debug("Ollama health check failed", exc_info=True)
            return False
  • Registration of 'health_check' as an MCP tool via the @mcp.tool decorator.
    @mcp.tool(
        name="health_check",
        description="Check whether the local Ollama service is reachable.",
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries the burden. It states the basic action but does not disclose error behavior or response format. However, an output schema exists which likely covers return details, mitigating the gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with purpose. No wasted words; efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool complexity is very low (no parameters, simple action). Output schema is present to cover return values. Description is sufficient for the agent to understand the tool's purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters, so baseline of 4 applies. Schema coverage is 100%, and no parameter info needed in description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks whether the local Ollama service is reachable. It uses a specific verb and resource, distinguishing it from sibling tools like add_document or chat.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives. It is implied as a basic health check, but explicit context about when not to use or prerequisites is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/deadSwank001/Nexus-MCP'

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