{
  "name": "inspect_workstream",
  "description": "Read a workstream's persisted state: state, title, skill, timestamps, last N messages. A `live` block from the owning node merges in when available (current tokens, activity, `pending_approval`) and reflects the node currently holding in-memory state, which can differ from the stored `node_id` if cluster membership shifted since spawn. `close_reason` surfaces when the workstream was closed with one. Provider-native content blocks are stripped by default for compactness; pass `include_provider_content=true` for the full-fidelity payload (replay tooling).",
  "parameters": {
    "type": "object",
    "properties": {
      "ws_id": {
        "type": "string",
        "description": "Workstream id to inspect."
      },
      "message_limit": {
        "type": "integer",
        "description": "Max messages to return (most recent first, reversed into chronological order). Default 20."
      },
      "include_provider_content": {
        "type": "boolean",
        "description": "When true, include provider-native content blocks (duplicates the plain `content` string for replay fidelity). Default false — trimmed shape keeps regular inspect calls half the size."
      }
    },
    "required": ["ws_id"]
  },
  "coordinator": true,
  "auto_approve": true,
  "primary_key": "ws_id"
}
