Skip to content

ollama_corpus_health

Corpus health. CORPUS. Health summary for indexed corpora. No Ollama call. A true superset of ollama_corpus_list (every list key, same spelling, compiler-enforced) plus: staleness_days, embed_model_resolved, within-refresh :latest drift, failed_path_count, write_complete, and per-corpus warnings[]. Optional name narrows to a single corpus (typos fail loud). Optional detailed: true adds a per-file list with mtime + stale_days. Use this as your go-to ‘is anything broken?’ check before search or refresh.

Parameter Type Required Default Description
name string no Single corpus to report on. When omitted, reports health for every corpus on disk.
detailed boolean no When true, each entry gets a per-file list with mtime + staleness_days. Default false — cheaper.

The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"description": "Single corpus to report on. When omitted, reports health for every corpus on disk.",
"type": "string",
"minLength": 1,
"pattern": "^[a-zA-Z0-9_-]+$"
},
"detailed": {
"description": "When true, each entry gets a per-file list with mtime + staleness_days. Default false — cheaper.",
"type": "boolean"
}
}
}

Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.

Schema + handler: src/tools/corpusHealth.ts · registration: src/index.ts


Back to the Tool Reference.