Skip to content

ollama_incident_brief

Incident brief. FLAGSHIP compound job. Produces a STRUCTURED OPERATOR BRIEF from log_text and/or source_paths, optionally blended with a named corpus for background context. Returns {root_cause_hypotheses, affected_surfaces, timeline_clues, next_checks, evidence, weak, coverage_notes, corpus_used}. Every hypothesis/surface/clue carries evidence_refs into the evidence array — refs to unknown ids are stripped server-side. Corpus-sourced evidence items carry retrieval score (and optionally why_matched). Optional corpus_min_evidence_score drops corpus chunks below the relevance floor before the model sees them, with a counted note in coverage_notes. Distinct from ollama_triage_logs (symptoms in one blob) and ollama_research (answer a specific question). Thin evidence degrades to weak=true with coverage_notes — never a smooth fake narrative. next_checks are INVESTIGATIVE, not remediations. If you pre-extracted claims via ollama_extract with a frame argument, drop off-topic items before assembling source_paths for this brief — there’s no in-brief topicality gate for path/log inputs.

Parameter Type Required Default Description
log_text string no Raw log blob to reason over. Combine with source_paths and/or corpus for a richer brief.
source_paths string[] no File paths read server-side (Claude does not preload). Use for config files, related source files, incident notes. Optional — log-driven calls work without it; runtime requires at least one of log_text or source_paths.
corpus string no Optional: named corpus (e.g. ‘doctrine’, ‘memory’) to pull background context from. Requires corpus_query when the log signal is too short to derive one.
corpus_query string no Query used to pull chunks from the corpus. Defaults to a digest of the log head if not provided.
per_file_max_chars integer no Chars per source file (default 20k).
max_hypotheses integer no Cap on root-cause hypotheses in the output (default 5).
corpus_min_evidence_score number no Minimum retrieval score (0–1) for a corpus chunk to enter evidence. Hits below the floor are dropped before the model sees them, with a counted note in coverage_notes. Use this when corpus retrieval may surface off-topic chunks. Absent → no relevance filter.

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": {
"log_text": {
"description": "Raw log blob to reason over. Combine with source_paths and/or corpus for a richer brief.",
"type": "string",
"minLength": 1
},
"source_paths": {
"description": "File paths read server-side (Claude does not preload). Use for config files, related source files, incident notes. Optional — log-driven calls work without it; runtime requires at least one of log_text or source_paths.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"corpus": {
"description": "Optional: named corpus (e.g. 'doctrine', 'memory') to pull background context from. Requires corpus_query when the log signal is too short to derive one.",
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$"
},
"corpus_query": {
"description": "Query used to pull chunks from the corpus. Defaults to a digest of the log head if not provided.",
"type": "string",
"minLength": 1
},
"per_file_max_chars": {
"description": "Chars per source file (default 20k).",
"type": "integer",
"minimum": 1000,
"maximum": 200000
},
"max_hypotheses": {
"description": "Cap on root-cause hypotheses in the output (default 5).",
"type": "integer",
"minimum": 1,
"maximum": 10
},
"corpus_min_evidence_score": {
"description": "Minimum retrieval score (0–1) for a corpus chunk to enter evidence. Hits below the floor are dropped before the model sees them, with a counted note in coverage_notes. Use this when corpus retrieval may surface off-topic chunks. Absent → no relevance filter.",
"type": "number",
"minimum": 0,
"maximum": 1
}
}
}

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


Back to the Tool Reference.