{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aimeat-io/json-schema/aimeat-io-agent-refusal-schema.json",
  "title": "AgentRefusal",
  "description": "One call the node refused an agent for a missing permission, counted per route.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aimeat-io-agents-api-openapi.yml#/components/schemas/AgentRefusal",
  "type": "object",
  "properties": {
    "needed": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The permissions the call needed."
    },
    "any_of": {
      "type": "boolean",
      "description": "True when any one of `needed` would have been enough."
    },
    "call": {
      "type": "string",
      "description": "Method and route pattern (`PATCH /v1/agents/:name/tags`), or `MCP <tool>` for a tool."
    },
    "count": {
      "type": "integer",
      "description": "How many times it was refused while open."
    },
    "first_at": {
      "type": "string",
      "format": "date-time"
    },
    "last_at": {
      "type": "string",
      "format": "date-time"
    },
    "declined": {
      "type": "boolean",
      "description": "The owner declined to give the permission. The owner's agent list leaves a declined refusal out; the agent's own read keeps it."
    }
  }
}