{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/backworkhealth-com/json-schema/backworkhealth-com-agent-tool-manifest-schema.json",
  "title": "AgentToolManifest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/backworkhealth-com-agent-tools-api-openapi.yml#/components/schemas/AgentToolManifest",
  "type": "object",
  "properties": {
    "version": {
      "type": "string"
    },
    "posture": {
      "type": "string"
    },
    "auth": {
      "type": "object",
      "properties": {
        "scheme": {
          "type": "string",
          "const": "bearer"
        },
        "header": {
          "type": "string"
        },
        "scopes": {
          "type": "object",
          "properties": {
            "read_fallback": {
              "type": "string"
            },
            "write_fallback": {
              "type": "string"
            },
            "agent_specific": {
              "type": "string"
            },
            "agent_wildcard": {
              "type": "string"
            }
          },
          "required": [
            "read_fallback",
            "write_fallback",
            "agent_specific",
            "agent_wildcard"
          ]
        },
        "write_approval": {
          "type": "string"
        }
      },
      "required": [
        "scheme",
        "header",
        "scopes",
        "write_approval"
      ]
    },
    "no_phi_boundary": {
      "type": "string"
    },
    "tools": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentTool"
      }
    }
  },
  "required": [
    "version",
    "posture",
    "auth",
    "no_phi_boundary",
    "tools"
  ],
  "$defs": {
    "AgentTool": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "MCP-style alias for id."
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "access": {
          "type": "string",
          "enum": [
            "read",
            "write"
          ]
        },
        "scope": {
          "type": "string",
          "description": "Tool-specific scope, `agent:tool:<tool_id>`"
        },
        "approval_required": {
          "type": "boolean",
          "description": "When true, invocation returns 202 until retried with `X-Backwork-Approval: reviewed`."
        },
        "billable_units": {
          "type": "integer"
        },
        "annotations": {
          "type": "object",
          "properties": {
            "readOnlyHint": {
              "type": "boolean"
            },
            "destructiveHint": {
              "type": "boolean"
            },
            "idempotentHint": {
              "type": "boolean"
            },
            "openWorldHint": {
              "type": "boolean"
            }
          },
          "required": [
            "readOnlyHint",
            "destructiveHint",
            "idempotentHint",
            "openWorldHint"
          ],
          "description": "Tool-use hints for MCP-style clients."
        },
        "endpoint": {
          "type": "string"
        },
        "method": {
          "type": "string",
          "const": "POST"
        },
        "input_schema": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": {},
          "description": "JSON Schema for the tool's request body"
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": {},
          "description": "MCP-style alias for input_schema"
        },
        "output_schema": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "object"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": {},
          "description": "JSON Schema (draft 2020-12) for the tool's result `data`. Every result carries a `provenance` block with source URLs, retrieval time, effective date, and issuing authority."
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "object"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": {},
          "description": "MCP-style alias for output_schema"
        },
        "allowed": {
          "description": "Whether the authenticated key can invoke this tool",
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "name",
        "title",
        "description",
        "access",
        "scope",
        "approval_required",
        "billable_units",
        "annotations",
        "endpoint",
        "method",
        "input_schema",
        "inputSchema",
        "output_schema",
        "outputSchema"
      ]
    }
  }
}