{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentik-cc/json-schema/agentik-cc-tool-schema.json",
  "title": "Tool",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentik-cc-openapi.yml#/components/schemas/Tool",
  "type": "object",
  "required": [
    "id",
    "provider",
    "name",
    "description",
    "category",
    "tags",
    "access",
    "pricing",
    "inputSchema",
    "status",
    "available",
    "auth_required"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "operator_only": {
      "type": "boolean",
      "description": "Provider-account maintenance operation; execution restricted to the configured operator workspace."
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "access": {
      "type": "string",
      "enum": [
        "open",
        "platform_key",
        "byok",
        "partner",
        "connection"
      ]
    },
    "pricing": {
      "$ref": "#/$defs/Pricing"
    },
    "license": {
      "type": "string"
    },
    "attribution": {
      "type": "string"
    },
    "docsUrl": {
      "type": "string"
    },
    "inputSchema": {
      "type": "object",
      "description": "JSON Schema (draft 7) of the run input"
    },
    "status": {
      "type": "string",
      "enum": [
        "active"
      ],
      "description": "Always active: customer surfaces only list tools that can run now"
    },
    "available": {
      "type": "boolean",
      "const": true
    },
    "auth_required": {
      "type": "string",
      "enum": [
        "none",
        "platform",
        "byok",
        "partner",
        "connection"
      ]
    },
    "connection": {
      "type": "object",
      "description": "Present for automatically provisioned workspace access. Human platform consent uses the URL and notice returned by getmcpads/connect-source; Agentik owner/admin session is required to open it.",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "getmcpads"
          ]
        },
        "name": {
          "type": "string"
        },
        "how": {
          "type": "string"
        }
      }
    },
    "settlement": {
      "type": "string",
      "enum": [
        "deferred"
      ],
      "description": "Present when the final price is known only when the upstream resource ends"
    },
    "upstream": {
      "type": "string",
      "enum": [
        "http",
        "mcp"
      ],
      "description": "Whether the tool is served by an HTTP API or a third-party MCP server"
    },
    "starred": {
      "type": "boolean",
      "description": "Recommended by Agentik (\"Starred by Agentik\"). Editorial only: it changes neither price nor ranking."
    }
  },
  "$defs": {
    "Pricing": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "model",
            "amountUsd"
          ],
          "properties": {
            "model": {
              "const": "per_call"
            },
            "amountUsd": {
              "type": "number"
            },
            "multipliers": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          }
        },
        {
          "type": "object",
          "required": [
            "model",
            "amountUsd",
            "unitsPath",
            "maxUnits"
          ],
          "properties": {
            "model": {
              "const": "per_unit"
            },
            "amountUsd": {
              "type": "number"
            },
            "unitsPath": {
              "type": "string"
            },
            "maxUnits": {
              "type": "number"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "model",
            "amountUsd",
            "maxMinutes"
          ],
          "properties": {
            "model": {
              "const": "per_minute"
            },
            "amountUsd": {
              "type": "number"
            },
            "maxMinutes": {
              "type": "number"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "model",
            "costPath",
            "maxUsdDefault",
            "maxUsdCap"
          ],
          "properties": {
            "model": {
              "const": "reported"
            },
            "costPath": {
              "type": "string"
            },
            "costMode": {
              "const": "actual",
              "description": "Reservation is an estimate; bill the exact receipt without a per-call cap."
            },
            "reservationBasis": {
              "type": "string"
            },
            "maxUsdDefault": {
              "type": "number"
            },
            "maxUsdCap": {
              "type": "number"
            }
          }
        }
      ]
    }
  }
}