ollama_incident_pack
Incident pack (writes artifact). PACK. Runs the full incident job end-to-end: triage_logs → corpus_search → incident_brief → deterministic markdown+JSON artifact on disk. Single call, single completed job, single pair of files the operator can keep and diff. Response is compact ({artifact:{markdown_path,json_path}, summary, steps}) — the full brief lives in the artifact, not the MCP payload. Fixed pipeline, fixed markdown layout, no prose drift. Use this instead of calling triage_logs + incident_brief manually when you want one deliverable.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
log_text |
string | no | — | Raw log blob. Combine with source_paths and/or corpus for richer coverage. |
source_paths |
any | no | — | File paths read server-side (related source, config, 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 for background context (e.g. ‘doctrine’, ‘memory’). |
corpus_query |
string | no | — | Corpus query (defaults to the log head). (max 200 chars — deliberately shorter than ollama_corpus_search.query’s 1000, because this is a short retrieval prompt, not a document.) |
title |
string | no | — | Short human title — used in the artifact header and filename slug. |
artifact_dir |
string | no | — | Directory to write the incident.md + incident.json artifact pair. Defaults to ~/.ollama-intern/artifacts/incident/. |
allowed_roots |
string[] | no | — | Absolute directories artifact_dir may live under when it is not inside INTERN_ARTIFACT_DIR. Same dual-declaration as ollama_artifact_export_to_path. |
confirm_write |
boolean | no | — | Required when the artifact pair would land on a protected path (.git/, SECURITY.md, memory/, …). Same gate as ollama_draft. |
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). |
backend |
"cloud" \ |
"local" |
no | — |
Full input schema
Section titled “Full input schema”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. Combine with source_paths and/or corpus for richer coverage.", "type": "string", "minLength": 1 }, "source_paths": { "description": "File paths read server-side (related source, config, incident notes). Optional — log-driven calls work without it; runtime requires at least one of log_text or source_paths." }, "corpus": { "description": "Optional named corpus for background context (e.g. 'doctrine', 'memory').", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$" }, "corpus_query": { "description": "Corpus query (defaults to the log head). (max 200 chars — deliberately shorter than ollama_corpus_search.query's 1000, because this is a short retrieval prompt, not a document.)", "type": "string", "minLength": 1, "maxLength": 200 }, "title": { "description": "Short human title — used in the artifact header and filename slug.", "type": "string", "minLength": 1, "maxLength": 120 }, "artifact_dir": { "description": "Directory to write the incident.md + incident.json artifact pair. Defaults to ~/.ollama-intern/artifacts/incident/.", "type": "string", "minLength": 1 }, "allowed_roots": { "description": "Absolute directories artifact_dir may live under when it is not inside INTERN_ARTIFACT_DIR. Same dual-declaration as ollama_artifact_export_to_path.", "type": "array", "items": { "type": "string", "minLength": 1 } }, "confirm_write": { "description": "Required when the artifact pair would land on a protected path (.git/, SECURITY.md, memory/, ...). Same gate as ollama_draft.", "type": "boolean" }, "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 }, "backend": { "description": "Optional per-call backend directive (v2.9). 'cloud' escalates THIS call to Ollama Cloud — works in cloud standby (OLLAMA_API_KEY set, OLLAMA_CLOUD_PRIMARY unset) and cloud-primary modes; errors with CLOUD_NOT_CONFIGURED when no cloud is configured (never silently runs local while claiming escalation). 'local' pins the call to the local backend (zero egress) even under cloud-primary. Omit for the mode default. Escalated calls disclose egress loudly and carry backend provenance on the envelope. Synthesis quality on this tool scales sharply with model class — on a repo-scale job the local 8B is often the binding constraint, not the evidence. Tools where a local model is genuinely adequate (ollama_summarize_fast, ollama_classify, ollama_triage_logs, and every no-LLM tool) deliberately do NOT offer this field. SCOPE: this directive reaches the brief synthesis step (ollama_incident_brief, Deep tier) ONLY — the triage pass (Instant tier), evidence assembly and the artifact write run on the mode default regardless. A pack is a mixed-cost pipeline; escalating all of it would bill a flagship for work a local model does fine.", "type": "string", "enum": [ "cloud", "local" ] } }}Envelope
Section titled “Envelope”Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.
Source
Section titled “Source”Schema + handler: src/tools/packs/incidentPack.ts · registration: src/index.ts
Back to the Tool Reference.