{
  "openapi": "3.0.1",
  "info": {
    "title": "MCP Proof: Bounded MCP Evaluation",
    "description": "Run a bounded known-answer evaluation set against an MCP server, snapshot tool schemas, grade deterministically, and return an evidence receipt. Not certification.",
    "version": "0.1",
    "x-build-id": "h1K7A1Kg2q89tpgVW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/savagnic~mcp-proof/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-savagnic-mcp-proof",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/savagnic~mcp-proof/runs": {
      "post": {
        "operationId": "runs-sync-savagnic-mcp-proof",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/savagnic~mcp-proof/run-sync": {
      "post": {
        "operationId": "run-sync-savagnic-mcp-proof",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "url",
          "evaluationSet"
        ],
        "properties": {
          "url": {
            "title": "MCP server endpoint",
            "type": "string",
            "description": "Streamable HTTP MCP endpoint to evaluate. http and https only. Loopback, RFC 1918, carrier-grade NAT, link-local (including the cloud metadata address 169.254.169.254), reserved and multicast addresses are refused before any connection is made, and redirects are never followed."
          },
          "evaluationSet": {
            "title": "Evaluation set (mcp-proof/evaluation-set/1)",
            "type": "object",
            "description": "Your known-answer cases. MCP Proof executes exactly these and claims nothing wider. Each case names a tool, its arguments and one deterministic matcher: textEquals, textContainsAll, textExcludes, textMatches, jsonPointerEquals, jsonPointerExists or isError."
          },
          "sign": {
            "title": "Emit a signed run receipt",
            "type": "boolean",
            "description": "Off by default and refused unless the operator provisioned a keystore through SAVAGE_RECEIPT_KEYSTORE. A run will not sign with a key it invented for itself, because a receipt nobody can attribute is worse than no receipt. A receipt is a run record, not a certificate.",
            "default": false
          },
          "failOnCaseFailure": {
            "title": "Exit 1 when any case does not pass",
            "type": "boolean",
            "description": "Turns the run into a CI gate. The result is still stored either way, and a tripped gate is never billed.",
            "default": false
          },
          "allowedHosts": {
            "title": "Allowed hostnames",
            "type": "array",
            "description": "Narrows the set of hostnames this run may reach. It can only narrow: it never widens the fixed network policy.",
            "items": {
              "type": "string"
            }
          },
          "caseTimeoutMs": {
            "title": "Per-case timeout (ms)",
            "minimum": 1000,
            "maximum": 120000,
            "type": "integer",
            "description": "Budget for one tools/call. A case that exceeds it is recorded as errored, never as a failure.",
            "default": 20000
          },
          "maxCases": {
            "title": "Maximum cases per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "The run is refused rather than truncated when the evaluation set is larger.",
            "default": 500
          },
          "timeoutMs": {
            "title": "Total MCP session budget (ms)",
            "minimum": 1000,
            "maximum": 120000,
            "type": "integer",
            "description": "Budget for the initialize and tools/list handshake.",
            "default": 20000
          },
          "maxTools": {
            "title": "Maximum advertised tools",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run is refused when the server advertises more tools than this.",
            "default": 5000
          },
          "authorizationHeader": {
            "title": "Authorization header",
            "type": "string",
            "description": "Sent to the MCP server as the Authorization header and nowhere else. Replaced with [redacted] in the stored input echo, and a fail-closed guard scans the serialized result for it before anything is written."
          },
          "tenantId": {
            "title": "Tenant id",
            "type": "string",
            "description": "Echoed back for correlation. Not used for anything else."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}