{
 "openapi": "3.1.0",
 "info": {
  "title": "Tool Calls (Agentic AI)",
  "version": "20261030b",
  "description": "Every call an agent made and what let it through. This column — grant, approval or guardrail — is what turns this table from a log into evidence."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "tool-calls": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "run_id": {
      "type": "string",
      "format": "uuid",
      "description": "Run id",
      "readOnly": true
     },
     "step_id": {
      "type": "string",
      "format": "uuid",
      "description": "Step id",
      "readOnly": true
     },
     "agent_id": {
      "type": "string",
      "format": "uuid",
      "description": "Agent id",
      "readOnly": true
     },
     "tool_id": {
      "type": "string",
      "format": "uuid",
      "description": "Tool id",
      "readOnly": true
     },
     "connection_id": {
      "type": "string",
      "format": "uuid",
      "description": "Connection id",
      "readOnly": true
     },
     "tool_code": {
      "type": "string",
      "description": "Tool code",
      "readOnly": true
     },
     "call_ref": {
      "type": "string",
      "description": "Call ref",
      "readOnly": true
     },
     "arguments": {
      "type": "object",
      "description": "Arguments",
      "readOnly": true
     },
     "result": {
      "type": "object",
      "description": "Result",
      "readOnly": true
     },
     "result_summary": {
      "type": "string",
      "description": "Result summary",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "authorized_by": {
      "type": "string",
      "description": "Authorized by",
      "readOnly": true
     },
     "approval_id": {
      "type": "string",
      "format": "uuid",
      "description": "Approval id",
      "readOnly": true
     },
     "denied_reason": {
      "type": "string",
      "description": "Denied reason",
      "readOnly": true
     },
     "http_status": {
      "type": "integer",
      "description": "Http status",
      "readOnly": true
     },
     "duration_ms": {
      "type": "integer",
      "description": "Duration ms",
      "readOnly": true
     },
     "cost": {
      "type": "string",
      "format": "decimal",
      "description": "Cost",
      "readOnly": true
     },
     "result_module": {
      "type": "string",
      "description": "Result module",
      "readOnly": true
     },
     "result_resource": {
      "type": "string",
      "description": "Result resource",
      "readOnly": true
     },
     "result_id": {
      "type": "string",
      "format": "uuid",
      "description": "Result id",
      "readOnly": true
     },
     "called_at": {
      "type": "string",
      "format": "date-time",
      "description": "Called at",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/agentic/tool-calls": {
   "get": {
    "summary": "list tool-calls",
    "operationId": "list_tool_calls_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post tool calls",
    "operationId": "action_tool_calls_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/tool-calls/{id}": {
   "get": {
    "summary": "get tool-calls",
    "operationId": "get_tool_calls_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put tool calls",
    "operationId": "action_tool_calls_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete tool calls",
    "operationId": "action_tool_calls_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/tool-calls/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_tool_calls_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}