ollama_artifact_read
Read artifact. ARTIFACT. Read a single pack artifact, typed by pack. Primary: {pack, slug} — identity-based, collisions fail loud. Secondary: {json_path} — absolute path, must live under a recognized artifact dir (canonical roots + extra_artifact_dirs), must end in .json, path-traversal rejected. Returns {metadata, artifact} where artifact is a discriminated union on pack (incident_pack / repo_pack / change_pack — payloads stay distinct, never flattened).
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pack |
"incident_pack" \ |
"repo_pack" \ |
"change_pack" |
no |
slug |
string | no | — | Artifact slug (filename stem). Pass WITH pack. |
json_path |
string | no | — | Absolute path to the artifact JSON file. Secondary escape hatch — must live under a recognized artifact dir; path-safety guarded. |
extra_artifact_dirs |
string[] | no | — | Extra read-only search dirs (same as artifact_list). Applied to both identity resolution and path safety. |
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": { "pack": { "description": "Pack identity. Pass WITH slug for the primary identity-based read.", "type": "string", "enum": [ "incident_pack", "repo_pack", "change_pack" ] }, "slug": { "description": "Artifact slug (filename stem). Pass WITH pack.", "type": "string", "minLength": 1 }, "json_path": { "description": "Absolute path to the artifact JSON file. Secondary escape hatch — must live under a recognized artifact dir; path-safety guarded.", "type": "string", "minLength": 1 }, "extra_artifact_dirs": { "description": "Extra read-only search dirs (same as artifact_list). Applied to both identity resolution and path safety.", "type": "array", "items": { "type": "string", "minLength": 1 } } }}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/artifactRead.ts · registration: src/index.ts
Back to the Tool Reference.