Skip to content

ollama_log_tail

Tail NDJSON log. OPS. Structured tail of the NDJSON observability log at ~/.ollama-intern/log.ndjson (override via INTERN_LOG_PATH). No model call. Optional filters: limit (default 50, max 500), filter_kind (‘call’ | ‘timeout’ | ‘fallback’ | ‘guardrail’ | ‘pack_step’ | ‘semaphore:wait’ | ‘prewarm’ | ‘prewarm:in_progress_request’), filter_tool, since (ISO-8601). Truncated final lines are skipped silently. Missing log file is a soft-empty case, not an error. Returns {events, total_returned, log_path, log_present}. Use this to debug why a call was slow / what timed out / what the last failures were.

Parameter Type Required Default Description
limit integer no Max events to return (newest first). Default 50, cap 500.
filter_kind string no Keep only events with this kind — e.g. ‘call’, ‘timeout’, ‘fallback’, ‘backend_fallback’ (cloud→local), ‘pack_step’, ‘semaphore:wait’.
filter_tool string no Keep only events whose tool matches — e.g. ‘ollama_research’.
since string no ISO-8601 timestamp. Keep only events with ts >= since. Invalid ISO → SCHEMA_INVALID.

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": {
"limit": {
"description": "Max events to return (newest first). Default 50, cap 500.",
"type": "integer",
"minimum": 1,
"maximum": 500
},
"filter_kind": {
"description": "Keep only events with this kind — e.g. 'call', 'timeout', 'fallback', 'backend_fallback' (cloud→local), 'pack_step', 'semaphore:wait'.",
"type": "string"
},
"filter_tool": {
"description": "Keep only events whose `tool` matches — e.g. 'ollama_research'.",
"type": "string"
},
"since": {
"description": "ISO-8601 timestamp. Keep only events with ts >= since. Invalid ISO → SCHEMA_INVALID.",
"type": "string"
}
}
}

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/logTail.ts · registration: src/index.ts


Back to the Tool Reference.