{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent-audit.multihead.dev/schema/manifest.json",
  "title": "agent-audit target manifest",
  "description": "Publish at /.well-known/agent-audit.json or POST as manifest. Version 0.1. Never put a key here.",
  "type": "object",
  "required": [
    "manifest_version"
  ],
  "properties": {
    "manifest_version": {
      "type": "string",
      "pattern": "^0\\.\\d+$",
      "examples": [
        "0.1"
      ]
    },
    "name": {
      "type": "string",
      "maxLength": 100
    },
    "first_call": {
      "type": "object",
      "required": [
        "path"
      ],
      "properties": {
        "method": {
          "const": "GET",
          "description": "v1 replays GET only."
        },
        "path": {
          "type": "string",
          "pattern": "^/(?!/)\\S*$",
          "maxLength": 1024,
          "description": "A path on the product's own origin."
        },
        "headers": {
          "type": "object",
          "propertyNames": {
            "enum": [
              "accept",
              "accept-language",
              "content-type"
            ]
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 200
          }
        },
        "success": {
          "type": "object",
          "properties": {
            "status": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "minItems": 1
                }
              ]
            },
            "json_field_in": {
              "type": "object",
              "description": "Field (top-level or dotted, up to 4 levels) → allowed values.",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "null"
                  ]
                },
                "maxItems": 20
              }
            }
          }
        },
        "bad_call": {
          "type": "object",
          "required": [
            "path"
          ],
          "properties": {
            "path": {
              "type": "string",
              "pattern": "^/(?!/)\\S*$",
              "maxLength": 1024,
              "description": "A path on the product's own origin."
            }
          },
          "description": "A GET that should fail with a 4xx."
        }
      }
    },
    "auth": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "none",
            "api_key",
            "oauth"
          ]
        },
        "header": {
          "type": "string",
          "pattern": "^[A-Za-z0-9-]{1,64}$"
        },
        "docs_url": {
          "type": "string",
          "pattern": "^https://"
        }
      }
    },
    "docs": {
      "type": "object",
      "properties": {
        "openapi": {
          "type": "string",
          "pattern": "^/(?!/)\\S*$",
          "maxLength": 1024,
          "description": "A path on the product's own origin."
        },
        "skill": {
          "type": "string",
          "pattern": "^/(?!/)\\S*$",
          "maxLength": 1024,
          "description": "A path on the product's own origin."
        },
        "llms": {
          "type": "string",
          "pattern": "^/(?!/)\\S*$",
          "maxLength": 1024,
          "description": "A path on the product's own origin."
        }
      }
    },
    "understanding": {
      "type": "object",
      "properties": {
        "endpoint_path": {
          "type": "string",
          "pattern": "^/(?!/)\\S*$",
          "maxLength": 1024,
          "description": "A path on the product's own origin."
        },
        "methods": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 7
        },
        "required_inputs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 20
        },
        "key_required": {
          "type": "boolean"
        },
        "rate_limited": {
          "type": "boolean"
        },
        "what_it_does": {
          "type": "string",
          "maxLength": 300
        }
      }
    },
    "asks": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "type": "object",
        "required": [
          "id",
          "text"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64
          },
          "text": {
            "type": "string",
            "maxLength": 500
          }
        }
      }
    },
    "connector": {
      "type": "object",
      "description": "Optional. Your MCP server, for the directory preflight (agents.directory-ready). agent-audit reads this block and never connects to the server. Rules: /v0/rules.",
      "required": [
        "tools"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 100
        },
        "url": {
          "type": "string",
          "pattern": "^https://",
          "description": "The remote MCP endpoint."
        },
        "auth": {
          "enum": [
            "none",
            "api_key",
            "oauth"
          ]
        },
        "privacy_url": {
          "type": "string",
          "pattern": "^https://"
        },
        "terms_url": {
          "type": "string",
          "pattern": "^https://"
        },
        "support_url": {
          "type": "string",
          "pattern": "^https://"
        },
        "docs_url": {
          "type": "string",
          "pattern": "^https://"
        },
        "repo": {
          "type": "string",
          "pattern": "^https://",
          "description": "A public source repository (needed for the Cursor Marketplace)."
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 100
          },
          "maxItems": 250
        },
        "tools": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "description": "Your MCP tools/list result.",
          "items": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "annotations": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "readOnlyHint": {
                    "type": "boolean"
                  },
                  "destructiveHint": {
                    "type": "boolean"
                  },
                  "idempotentHint": {
                    "type": "boolean"
                  },
                  "openWorldHint": {
                    "type": "boolean"
                  }
                }
              },
              "inputSchema": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}
