{
  "manifest_schema_id": "actex.tool_manifest.v1",
  "manifest_version": "1.0.0",
  "tools": [
    {
      "name": "actex.contract.get",
      "capability": "ACTEX_MARKET_READ",
      "description": "Fetch a contract by contract_id.",
      "safety_notes": "Read-only; returns contract state only. No network calls. No shell execution.",
      "input_schema": {
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "transaction_id"
        ],
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.contract.get"
          },
          "capability": {
            "const": "ACTEX_MARKET_READ"
          },
          "data": {
            "type": "object",
            "properties": {
              "transaction_id": {
                "type": "string"
              },
              "buyer_id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            },
            "required": [
              "transaction_id",
              "buyer_id",
              "status"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.contract.receipt",
      "capability": "ACTEX_MARKET_READ",
      "description": "Fetch the latest receipt for a contract.",
      "safety_notes": "Read-only; returns receipt data only. No network calls. No shell execution.",
      "input_schema": {
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "transaction_id"
        ],
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.contract.receipt"
          },
          "capability": {
            "const": "ACTEX_MARKET_READ"
          },
          "data": {
            "type": "object",
            "properties": {
              "receipt_id": {
                "type": "string"
              },
              "transaction_id": {
                "type": "string"
              },
              "verification_status": {
                "type": "string"
              }
            },
            "required": [
              "receipt_id",
              "transaction_id",
              "verification_status"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.casefile.export",
      "capability": "ACTEX_CASEFILE_EXPORT",
      "description": "Export a deterministic casefile docket for a receipt/contract/run.",
      "safety_notes": "Read-only export surface; no publication side effects. No network calls. No shell execution.",
      "input_schema": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "include_artifacts": {
            "type": "boolean"
          },
          "include_artifact_payloads": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "redaction_profile": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "PARTICIPANT",
              "AUDITOR",
              "COUNTERPARTY",
              "AUDIT",
              "CONFIDENTIAL"
            ]
          }
        },
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.casefile.export"
          },
          "capability": {
            "const": "ACTEX_CASEFILE_EXPORT"
          },
          "data": {
            "type": "object",
            "properties": {
              "schema_id": {
                "type": "string"
              },
              "schema_version": {
                "type": "string"
              },
              "docket_id": {
                "type": "string"
              }
            },
            "required": [
              "schema_id",
              "schema_version",
              "docket_id"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.casefile.verify",
      "capability": "ACTEX_CASEFILE_VERIFY",
      "description": "Verify a casefile docket object.",
      "safety_notes": "Read-only verification surface; validates docket payloads. No network calls. No shell execution.",
      "input_schema": {
        "type": "object",
        "properties": {
          "docket": {
            "type": "object"
          }
        },
        "required": [
          "docket"
        ],
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.casefile.verify"
          },
          "capability": {
            "const": "ACTEX_CASEFILE_VERIFY"
          },
          "data": {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean"
              },
              "object_count": {
                "type": "integer"
              },
              "file_count": {
                "type": "integer"
              }
            },
            "required": [
              "ok",
              "object_count",
              "file_count"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.gateway.proxy_call",
      "capability": "ACTEX_GATEWAY_PROXY",
      "description": "Record a gateway proxy call and emit policy/usage objects.",
      "safety_notes": "Gateway proxy ingress for shadow/enforcement policy recording.",
      "input_schema": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string"
          },
          "caller_agent_id": {
            "type": "string"
          },
          "capability_id": {
            "type": "string"
          },
          "http_method": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "requested_units": {
            "type": "integer"
          },
          "unit_price": {
            "type": "integer"
          },
          "budget_remaining": {
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "caller_agent_id",
          "capability_id",
          "http_method",
          "endpoint",
          "requested_units",
          "unit_price",
          "budget_remaining"
        ],
        "additionalProperties": true
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.gateway.proxy_call"
          },
          "capability": {
            "const": "ACTEX_GATEWAY_PROXY"
          },
          "data": {
            "type": "object",
            "properties": {
              "call_id": {
                "type": "string"
              },
              "mode": {
                "type": "string"
              },
              "allowed": {
                "type": "boolean"
              }
            },
            "required": [
              "call_id",
              "mode",
              "allowed"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.gateway.casefile_export",
      "capability": "ACTEX_GATEWAY_CASEFILE",
      "description": "Export a gateway run docket from gateway receipts.",
      "safety_notes": "Deterministic casefile export for gateway-generated usage receipts.",
      "input_schema": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string"
          }
        },
        "required": [
          "run_id"
        ],
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.gateway.casefile_export"
          },
          "capability": {
            "const": "ACTEX_GATEWAY_CASEFILE"
          },
          "data": {
            "type": "object",
            "properties": {
              "schema_id": {
                "type": "string"
              },
              "schema_version": {
                "type": "string"
              },
              "docket_id": {
                "type": "string"
              }
            },
            "required": [
              "schema_id",
              "schema_version",
              "docket_id"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.gateway.casefile_verify",
      "capability": "ACTEX_GATEWAY_CASEFILE",
      "description": "Verify a gateway casefile docket payload.",
      "safety_notes": "Gateway docket verification using existing ACTEX verify logic.",
      "input_schema": {
        "type": "object",
        "properties": {
          "docket": {
            "type": "object"
          }
        },
        "required": [
          "docket"
        ],
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.gateway.casefile_verify"
          },
          "capability": {
            "const": "ACTEX_GATEWAY_CASEFILE"
          },
          "data": {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean"
              },
              "object_count": {
                "type": "integer"
              },
              "file_count": {
                "type": "integer"
              }
            },
            "required": [
              "ok",
              "object_count",
              "file_count"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "actex.gateway.metrics",
      "capability": "ACTEX_GATEWAY_READ",
      "description": "Summarize gateway coverage and deny metrics.",
      "safety_notes": "Read-only gateway telemetry metrics summary.",
      "input_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "schema_id": {
            "const": "actex.tool_server.call_result.v1"
          },
          "schema_version": {
            "const": "1.0.0"
          },
          "request_id": {
            "type": "string"
          },
          "tool_name": {
            "const": "actex.gateway.metrics"
          },
          "capability": {
            "const": "ACTEX_GATEWAY_READ"
          },
          "data": {
            "type": "object",
            "properties": {
              "paid_call_coverage_ratio": {
                "type": "number"
              },
              "deny_count": {
                "type": "integer"
              }
            },
            "required": [
              "paid_call_coverage_ratio",
              "deny_count"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "ok",
          "schema_id",
          "schema_version",
          "request_id",
          "tool_name",
          "capability",
          "data",
          "warnings",
          "errors"
        ],
        "additionalProperties": false
      }
    }
  ]
}