check_ollama
Verify the LLM backend is running and the configured embedding or chat model is installed before semantic search, smart search, or symbol explanation, avoiding failed LLM-dependent tool calls.
Instructions
Check whether the LLM backend is running and the configured embedding/chat model is installed.
Read-only: yes. No side effects. Call before smart_search, semantic_search, or explain_symbol (when on-demand fallback is expected — pre-computed analysis returns instantly without the LLM backend).
Args: project_root: Project root. Auto-detected if omitted. Used to locate the project's LLM configuration. project: Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both.
Returns:
dict: {ollama_enabled (bool), status (str — "ok"|"disabled"|
"not_configured"|"model_missing"|"embedding_unavailable"|"error"),
ollama_running (bool), ollama_url (str), configured_model (str),
num_ctx (int), installed_models (list[str]),
chat_api (dict — {configured (bool), model (str)}: whether an
external chat API replaces Ollama, and the model it names; a
configured one adds endpoint, format, and compliance_warning for an
external host),
configured_embed_model (str), embedding_installed (bool),
embedding_backend (str — "ollama", "local" for a
sentence-transformers or ft:// model, which needs no Ollama:
it counts as installed, and with chat on an external API a
stopped Ollama still gives "ok"; or the provider of an API profile
of the embeddings, "openrouter" or "openai_compatible"),
embedding_compliance_warning (str, when the embeddings go to an
external API: the code and each search query leave the machine),
version_problem (str, when the Ollama server of ollama_url is
older than the oldest version of one of its uses: 0.40.15 for the
embeddings, 0.30.1 for the chat),
message (str, when status is not "ok"), model_details (list[dict]),
suggest_cloud (bool), vec_available (bool),
vec_error (str, optional), debug_log (str, optional — only when
debug logging is enabled)}
The tool looks for the chat model on the Ollama server of the chat
profile (the ``url`` of an Ollama profile). A profile of another
provider (an API or the ChatGPT plan) runs the model itself, and
the tool asks no Ollama server for it. ``"model_missing"``:
``message`` names a command for each missing model, which sets
``OLLAMA_HOST`` to the server that must hold the model.
``"error"`` also means that the Ollama server of the chat profile
gives no model list. When the Ollama server of the embeddings
(``ollama_url``) does not answer, the tool does not look for the
chat model.
ollama_url, num_ctx, installed_models, model_details,
configured_embed_model, and embedding_installed are present only
when Ollama runs; configured_model also needs chat on Ollama.
``"disabled"`` gives only status, ollama_enabled,
ollama_running, configured_model, num_ctx, and message;
embedding_backend is present on every other status.What to do for each status:
"ok","disabled": continue."disabled"means that no tool calls the LLM."not_configured": whenmessagesays that the url of the Ollama profile names a server that is not Ollama, the operator corrects that profile. Else ask the operator: a local Ollama or a cloud service? For a local Ollama, the operator installs it from https://ollama.com (without internet: the installer from a different computer). Do not install Ollama yourself. For a cloud service, the operator runsfw-context llm setupin a terminal, then you callconfigure_llm(profile=<name>)."model_missing": give the size of each model as your estimate, and say that it can be wrong. Ask: pull the model, or use a cloud service? Run a command ofmessageonly after the approval. In a different shell, setOLLAMA_HOSTas the command does: without it, the model can go to a different server. When the pull fails on the network, the operator can pull the model on a computer with internet and copy~/.ollama/models/. Withsuggest_cloud: true, no installed model is large enough for code: recommend a cloud service."embedding_unavailable": tell the operator thatsemantic_searchdoes not work, and give the cause frommessage."error": givemessageto the operator.version_problem, with each status: give it to the operator. An index run does not do the use that it names (no embeddings, or no LLM analysis) until the operator updates Ollama.
WHY these rules are here and not only in the server instructions: an LLM client can cut the instructions of a server (Claude Code keeps approximately 2500 characters), and it always sends the description of a tool.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_ollama"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both. | |
| project_root | No | Project root. Auto-detected if omitted. Used to locate LLM config. Falls back to auto-detection when omitted. This field also accepts a project name or a project_id, but project is the clear field for those. |