{
  "contractVersion": "0.1.0-eval.1",
  "sourceRuntime": "covered-order-gate 15f10c5066fb381c0033246c81e200cf0c569ee7",
  "serverInfo": {
    "name": "galore-gate-evaluation",
    "version": "0.1.0-eval.1"
  },
  "scope": "Complete supported public local-evaluation transport and tool surface. Eleven real Gate tools plus one synthetic fixture-control tool. No hosted or live-broker endpoint is promised.",
  "baseUrl": "http://127.0.0.1:8787",
  "protocol": "MCP Streamable HTTP, stateless POST, JSON-RPC 2.0",
  "requestHeaders": {
    "content-type": "application/json",
    "accept": "application/json, text/event-stream"
  },
  "routes": [
    {
      "method": "GET",
      "path": "/health",
      "authentication": "none",
      "response": {
        "ok": true,
        "service": "galore-gate-evaluation"
      }
    },
    {
      "method": "POST",
      "path": "/mcp",
      "authentication": "Authorization: Bearer <local evaluation agent API key>",
      "role": "agent"
    },
    {
      "method": "POST",
      "path": "/platform/mcp",
      "authentication": "HMAC-SHA256 signed trusted-member request; details in INTEGRATION.md",
      "role": "member or agent as signed by the trusted host"
    }
  ],
  "allOtherPaths": "404, including broker connection and OAuth paths",
  "units": {
    "money": "USD numbers in whole cents; no strings, nonfinite values or fractional cents",
    "quantity": "positive whole shares",
    "timestamps": "integer Unix epoch milliseconds",
    "quoteTime": "scripted evaluation clock"
  },
  "semanticConstraints": [
    "Exactly one of qty and notionalUsd is required on an entry. Notional converts downward to whole shares.",
    "floorMin <= stopPrice < softLine < limitPrice. Prices are between 1 and 1000000 USD and must be whole cents.",
    "An intent must expire after the current evaluation time and no later than 60000 milliseconds ahead.",
    "Entry permission expiry is after the evaluation time and within 90 days; regular protection is required.",
    "Permissions must bind the authenticated agent ID and the actual account. Review tokens are single-use, actor-bound and valid for at most five minutes of evaluation time.",
    "JSON Schema does not encode every arithmetic or cross-field condition. The included source and semantic constraints are normative as well as each generated input schema.",
    "Only regular-session whole-share FOK limit buys enter this path. A PASS is a check result; inspect status and reconcile the broker outcome."
  ],
  "tools": [
    {
      "name": "discard_gate_draft",
      "description": "Member only: discard one exact unsigned account draft. Active/signed records and protection are preserved; rate quotas do not reset.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "mandate",
              "review",
              "automation",
              "copy"
            ]
          },
          "draft_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "kind",
          "draft_id"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "member",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "discarded": {
            "const": true
          },
          "protectionPreserved": {
            "const": true
          },
          "quotaReset": {
            "const": false
          }
        },
        "required": [
          "discarded",
          "protectionPreserved",
          "quotaReset"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "preview_checked_order",
      "description": "Compile supported buy wording into a draft only. Unsupported conditions ask for clarification; never signs or submits.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": [
          "text"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "outcome": {
            "enum": [
              "DRAFT",
              "CLARIFY",
              "READ_ONLY"
            ]
          },
          "reason": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string"
              },
              "qty": {
                "type": "integer"
              },
              "notionalUsd": {
                "type": "number"
              },
              "limitPrice": {
                "type": "number"
              },
              "stopPrice": {
                "type": "number"
              }
            },
            "required": [
              "symbol",
              "limitPrice",
              "stopPrice"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "outcome",
          "reason"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "draft_order_mandate",
      "description": "Create paper entry permission draft. Only an authenticated member can sign. Synthetic exits need the service running.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "object",
            "properties": {
              "agents": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[A-Za-z0-9:_-]+$"
                }
              },
              "symbols": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[A-Z]{1,5}(\\.[A-Z])?$"
                }
              },
              "maxQty": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 1000000
              },
              "maxOrderUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxExposureUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxRiskUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxDailyLossUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxEntriesPerDay": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "maxEntriesPerSymbol": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              "maxPriceDeviationPct": {
                "type": "number",
                "minimum": 0,
                "maximum": 5
              },
              "expiresAt": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "resizeDown": {
                "type": "boolean"
              },
              "minRetainedPct": {
                "type": "number",
                "minimum": 1,
                "maximum": 100
              },
              "syntheticProtectionAccepted": {
                "type": "boolean",
                "const": true
              },
              "protectionDisclosure": {
                "default": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss.",
                "type": "string",
                "const": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss."
              },
              "lossBasis": {
                "default": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries.",
                "type": "string",
                "const": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries."
              },
              "costAllowanceUsd": {
                "default": 1,
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "protectionSessions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "regular",
                    "overnight",
                    "pre_market",
                    "after_hours"
                  ]
                }
              },
              "protectionExpiresInDays": {
                "default": 90,
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "signalMode": {
                "default": "discretionary",
                "type": "string",
                "enum": [
                  "discretionary",
                  "signed_automation"
                ]
              },
              "maxPreflightChecksPerMinute": {
                "default": 4,
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "maxPreflightChecksPerDay": {
                "default": 40,
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "duplicateWindowSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3600
              }
            },
            "required": [
              "agents",
              "symbols",
              "maxQty",
              "maxOrderUsd",
              "maxExposureUsd",
              "maxRiskUsd",
              "maxDailyLossUsd",
              "maxEntriesPerDay",
              "maxEntriesPerSymbol",
              "maxPriceDeviationPct",
              "expiresAt",
              "resizeDown",
              "minRetainedPct",
              "syntheticProtectionAccepted",
              "protectionSessions"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "permissions"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "mandateId": {
            "type": "string"
          },
          "cardHash": {
            "type": "string"
          },
          "card": {
            "type": "object",
            "properties": {
              "agents": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[A-Za-z0-9:_-]+$"
                }
              },
              "symbols": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[A-Z]{1,5}(\\.[A-Z])?$"
                }
              },
              "maxQty": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 1000000
              },
              "maxOrderUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxExposureUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxRiskUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxDailyLossUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxEntriesPerDay": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "maxEntriesPerSymbol": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              "maxPriceDeviationPct": {
                "type": "number",
                "minimum": 0,
                "maximum": 5
              },
              "expiresAt": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "resizeDown": {
                "type": "boolean"
              },
              "minRetainedPct": {
                "type": "number",
                "minimum": 1,
                "maximum": 100
              },
              "syntheticProtectionAccepted": {
                "type": "boolean",
                "const": true
              },
              "protectionDisclosure": {
                "default": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss.",
                "type": "string",
                "const": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss."
              },
              "lossBasis": {
                "default": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries.",
                "type": "string",
                "const": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries."
              },
              "costAllowanceUsd": {
                "default": 1,
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "protectionSessions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "regular",
                    "overnight",
                    "pre_market",
                    "after_hours"
                  ]
                }
              },
              "protectionExpiresInDays": {
                "default": 90,
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "signalMode": {
                "default": "discretionary",
                "type": "string",
                "enum": [
                  "discretionary",
                  "signed_automation"
                ]
              },
              "maxPreflightChecksPerMinute": {
                "default": 4,
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "maxPreflightChecksPerDay": {
                "default": 40,
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "duplicateWindowSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3600
              }
            },
            "required": [
              "agents",
              "symbols",
              "maxQty",
              "maxOrderUsd",
              "maxExposureUsd",
              "maxRiskUsd",
              "maxDailyLossUsd",
              "maxEntriesPerDay",
              "maxEntriesPerSymbol",
              "maxPriceDeviationPct",
              "expiresAt",
              "resizeDown",
              "minRetainedPct",
              "syntheticProtectionAccepted",
              "protectionSessions"
            ],
            "additionalProperties": false
          },
          "status": {
            "const": "pending"
          }
        },
        "required": [
          "mandateId",
          "cardHash",
          "card",
          "status"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_order_mandate",
      "description": "Read the exact stored permission card and hash. A trusted member session receives a short-lived, actor-bound confirmation token. The host must display this server response directly before confirmation.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "mandate_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "mandate_id"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "mandateId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "card": {
            "type": "object",
            "properties": {
              "agents": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[A-Za-z0-9:_-]+$"
                }
              },
              "symbols": {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[A-Z]{1,5}(\\.[A-Z])?$"
                }
              },
              "maxQty": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 1000000
              },
              "maxOrderUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxExposureUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxRiskUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxDailyLossUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "maxEntriesPerDay": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "maxEntriesPerSymbol": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              "maxPriceDeviationPct": {
                "type": "number",
                "minimum": 0,
                "maximum": 5
              },
              "expiresAt": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "resizeDown": {
                "type": "boolean"
              },
              "minRetainedPct": {
                "type": "number",
                "minimum": 1,
                "maximum": 100
              },
              "syntheticProtectionAccepted": {
                "type": "boolean",
                "const": true
              },
              "protectionDisclosure": {
                "default": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss.",
                "type": "string",
                "const": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss."
              },
              "lossBasis": {
                "default": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries.",
                "type": "string",
                "const": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries."
              },
              "costAllowanceUsd": {
                "default": 1,
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "protectionSessions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "regular",
                    "overnight",
                    "pre_market",
                    "after_hours"
                  ]
                }
              },
              "protectionExpiresInDays": {
                "default": 90,
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "signalMode": {
                "default": "discretionary",
                "type": "string",
                "enum": [
                  "discretionary",
                  "signed_automation"
                ]
              },
              "maxPreflightChecksPerMinute": {
                "default": 4,
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "maxPreflightChecksPerDay": {
                "default": 40,
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "duplicateWindowSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3600
              }
            },
            "required": [
              "agents",
              "symbols",
              "maxQty",
              "maxOrderUsd",
              "maxExposureUsd",
              "maxRiskUsd",
              "maxDailyLossUsd",
              "maxEntriesPerDay",
              "maxEntriesPerSymbol",
              "maxPriceDeviationPct",
              "expiresAt",
              "resizeDown",
              "minRetainedPct",
              "syntheticProtectionAccepted",
              "protectionSessions"
            ],
            "additionalProperties": false
          },
          "cardHash": {
            "type": "string"
          },
          "integrityValid": {
            "type": "boolean"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "brokerMode": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "brokerMode"
            ],
            "additionalProperties": false
          },
          "brokerConnection": {
            "type": "object",
            "properties": {
              "matchesCurrent": {
                "type": "boolean"
              },
              "fingerprint": {
                "type": "string"
              }
            },
            "required": [
              "matchesCurrent",
              "fingerprint"
            ],
            "additionalProperties": false
          },
          "reviewInstruction": {
            "type": "string"
          },
          "reviewToken": {
            "type": "string"
          },
          "reviewExpiresAt": {
            "type": "integer"
          }
        },
        "required": [
          "mandateId",
          "status",
          "card",
          "cardHash",
          "integrityValid",
          "account",
          "brokerConnection",
          "reviewInstruction"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "sign_order_mandate",
      "description": "Member only: confirm the exact stored card after get_order_mandate in the same member session. Agent text, a bare hash and user_confirmed flags cannot authorize this.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "mandate_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "card_hash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "review_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "mandate_id",
          "card_hash",
          "review_token"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "member",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "mandateId": {
            "type": "string"
          },
          "status": {
            "const": "active"
          }
        },
        "required": [
          "mandateId",
          "status"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "submit_checked_order",
      "description": "Checked paper-only whole-share entry, regular-session FOK limit, signed synthetic stop required. No arbitrary scripts, fund moves, live orders or unsupported instruments.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order": {
            "type": "object",
            "properties": {
              "mandateId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9:_-]+$"
              },
              "eventId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9:_-]+$"
              },
              "symbol": {
                "type": "string",
                "pattern": "^[A-Z]{1,5}(\\.[A-Z])?$"
              },
              "qty": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 1000000
              },
              "notionalUsd": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "limitPrice": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "softLine": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "stopPrice": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "floorMin": {
                "type": "number",
                "minimum": 1,
                "maximum": 1000000
              },
              "validUntil": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "trigger": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "below",
                      "above"
                    ]
                  },
                  "threshold": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "kind",
                  "threshold"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "mandateId",
              "eventId",
              "symbol",
              "limitPrice",
              "softLine",
              "stopPrice",
              "floorMin",
              "validUntil"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "order"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "outcome": {
            "enum": [
              "BLOCK",
              "HOLD",
              "PASS",
              "REPAIR"
            ]
          },
          "reason": {
            "type": "string"
          },
          "clientOrderId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "ruleId": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          }
        },
        "required": [
          "outcome",
          "reason"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "revoke_order_mandate",
      "description": "Member only: permanently end one entry permission. Later orders under it are blocked; it cannot be re-signed. Existing signed protective exits stay active.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "mandate_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "mandate_id"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "member",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "mandateId": {
            "type": "string"
          },
          "status": {
            "const": "revoked"
          },
          "protectionPreserved": {
            "const": true
          }
        },
        "required": [
          "mandateId",
          "status",
          "protectionPreserved"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "halt_entries",
      "description": "Stop new Gate entries while preserving existing signed Night Stop protective exits.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "halted": {
            "const": true
          },
          "protectionPreserved": {
            "const": true
          }
        },
        "required": [
          "halted",
          "protectionPreserved"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "gate_status",
      "description": "Entry mandates, actual broker lifecycle status, unknown submissions and linked Night Stop protections.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "draftLimits": {
            "type": "object",
            "properties": {
              "perMinute": {
                "type": "integer"
              },
              "perDay": {
                "type": "integer"
              },
              "pending": {
                "type": "integer"
              },
              "budget": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string"
                  },
                  "day_count": {
                    "type": "integer"
                  },
                  "minute_at": {
                    "type": "integer"
                  },
                  "minute_count": {
                    "type": "integer"
                  }
                },
                "required": [
                  "day",
                  "day_count",
                  "minute_at",
                  "minute_count"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "perMinute",
              "perDay",
              "pending"
            ],
            "additionalProperties": false
          },
          "mandates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "halted": {
                  "type": "integer"
                },
                "signed_at": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "card": {
                  "type": "object",
                  "properties": {
                    "agents": {
                      "minItems": 1,
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100,
                        "pattern": "^[A-Za-z0-9:_-]+$"
                      }
                    },
                    "symbols": {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z]{1,5}(\\.[A-Z])?$"
                      }
                    },
                    "maxQty": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 1000000
                    },
                    "maxOrderUsd": {
                      "type": "number",
                      "minimum": 1,
                      "maximum": 1000000
                    },
                    "maxExposureUsd": {
                      "type": "number",
                      "minimum": 1,
                      "maximum": 1000000
                    },
                    "maxRiskUsd": {
                      "type": "number",
                      "minimum": 1,
                      "maximum": 1000000
                    },
                    "maxDailyLossUsd": {
                      "type": "number",
                      "minimum": 1,
                      "maximum": 1000000
                    },
                    "maxEntriesPerDay": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "maxEntriesPerSymbol": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10
                    },
                    "maxPriceDeviationPct": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 5
                    },
                    "expiresAt": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "resizeDown": {
                      "type": "boolean"
                    },
                    "minRetainedPct": {
                      "type": "number",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "syntheticProtectionAccepted": {
                      "type": "boolean",
                      "const": true
                    },
                    "protectionDisclosure": {
                      "default": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss.",
                      "type": "string",
                      "const": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss."
                    },
                    "lossBasis": {
                      "default": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries.",
                      "type": "string",
                      "const": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries."
                    },
                    "costAllowanceUsd": {
                      "default": 1,
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "protectionSessions": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "regular",
                          "overnight",
                          "pre_market",
                          "after_hours"
                        ]
                      }
                    },
                    "protectionExpiresInDays": {
                      "default": 90,
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 365
                    },
                    "signalMode": {
                      "default": "discretionary",
                      "type": "string",
                      "enum": [
                        "discretionary",
                        "signed_automation"
                      ]
                    },
                    "maxPreflightChecksPerMinute": {
                      "default": 4,
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 4
                    },
                    "maxPreflightChecksPerDay": {
                      "default": 40,
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "duplicateWindowSeconds": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 3600
                    }
                  },
                  "required": [
                    "agents",
                    "symbols",
                    "maxQty",
                    "maxOrderUsd",
                    "maxExposureUsd",
                    "maxRiskUsd",
                    "maxDailyLossUsd",
                    "maxEntriesPerDay",
                    "maxEntriesPerSymbol",
                    "maxPriceDeviationPct",
                    "expiresAt",
                    "resizeDown",
                    "minRetainedPct",
                    "syntheticProtectionAccepted",
                    "protectionSessions"
                  ],
                  "additionalProperties": false
                },
                "card_hash": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "status",
                "halted",
                "signed_at",
                "card",
                "card_hash"
              ],
              "additionalProperties": false
            }
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "client_id": {
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "qty": {
                  "type": "number"
                },
                "status": {
                  "type": "string"
                },
                "filled_qty": {
                  "type": "number"
                },
                "rule_id": {
                  "type": "string"
                },
                "error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "client_id",
                "symbol",
                "qty",
                "status",
                "filled_qty",
                "rule_id",
                "error"
              ],
              "additionalProperties": false
            }
          },
          "incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "connection": {
            "type": "object",
            "additionalProperties": true
          },
          "exitChecks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "required": [
          "draftLimits",
          "mandates",
          "entries",
          "incidents",
          "exitChecks"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "close_owned_entry",
      "description": "Request a reduction of this agent’s confirmed Gate-owned entry, under the existing signed exit floor. Works while new entries are halted.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "client_order_id": {
            "type": "string"
          },
          "qty": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "client_order_id"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "requested": {
            "const": true
          },
          "ruleId": {
            "type": "string"
          },
          "status": {
            "const": "waiting_for_valid_quote_and_signed_price_floor"
          }
        },
        "required": [
          "requested",
          "ruleId",
          "status"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_audit_log",
      "title": "Audit log",
      "description": "Append-only record of every decision, quote snapshot and order, newest last.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "maxLength": 64
          },
          "limit": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          }
        },
        "$schema": "http://json-schema.org/draft-07/schema#",
        "additionalProperties": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "agent or member, subject to account and signed agent scope",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string"
                },
                "rule_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "kind": {
                  "type": "string"
                },
                "data": {}
              },
              "required": [
                "at",
                "rule_id",
                "kind",
                "data"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "entries"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "evaluation_control",
      "description": "Synthetic evaluation only. Member fixture controls quotes, clock, ticks and injected faults. Never contacts a broker.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "role": "member",
      "outputDataSchema": {
        "type": "object",
        "properties": {
          "environment": {
            "const": "local-simulation"
          },
          "now": {
            "type": "integer"
          },
          "accountId": {
            "type": "string"
          },
          "positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string"
                },
                "qty": {
                  "type": "number"
                },
                "avg": {
                  "type": "number"
                }
              },
              "required": [
                "symbol",
                "qty",
                "avg"
              ],
              "additionalProperties": false
            }
          },
          "orders": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "gate": {
            "type": "object",
            "properties": {
              "draftLimits": {
                "type": "object",
                "properties": {
                  "perMinute": {
                    "type": "integer"
                  },
                  "perDay": {
                    "type": "integer"
                  },
                  "pending": {
                    "type": "integer"
                  },
                  "budget": {
                    "type": "object",
                    "properties": {
                      "day": {
                        "type": "string"
                      },
                      "day_count": {
                        "type": "integer"
                      },
                      "minute_at": {
                        "type": "integer"
                      },
                      "minute_count": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "day",
                      "day_count",
                      "minute_at",
                      "minute_count"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "perMinute",
                  "perDay",
                  "pending"
                ],
                "additionalProperties": false
              },
              "mandates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "halted": {
                      "type": "integer"
                    },
                    "signed_at": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "card": {
                      "type": "object",
                      "properties": {
                        "agents": {
                          "minItems": 1,
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "pattern": "^[A-Za-z0-9:_-]+$"
                          }
                        },
                        "symbols": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{1,5}(\\.[A-Z])?$"
                          }
                        },
                        "maxQty": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 1000000
                        },
                        "maxOrderUsd": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "maxExposureUsd": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "maxRiskUsd": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "maxDailyLossUsd": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "maxEntriesPerDay": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "maxEntriesPerSymbol": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10
                        },
                        "maxPriceDeviationPct": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 5
                        },
                        "expiresAt": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "resizeDown": {
                          "type": "boolean"
                        },
                        "minRetainedPct": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "syntheticProtectionAccepted": {
                          "type": "boolean",
                          "const": true
                        },
                        "protectionDisclosure": {
                          "default": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss.",
                          "type": "string",
                          "const": "Synthetic exits need the service, fresh quotes and a working broker; gaps can exceed planned loss."
                        },
                        "lossBasis": {
                          "default": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries.",
                          "type": "string",
                          "const": "Conservative account equity loss; recent credits cannot mask losses; ambiguous cash activity holds entries."
                        },
                        "costAllowanceUsd": {
                          "default": 1,
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "protectionSessions": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "regular",
                              "overnight",
                              "pre_market",
                              "after_hours"
                            ]
                          }
                        },
                        "protectionExpiresInDays": {
                          "default": 90,
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 365
                        },
                        "signalMode": {
                          "default": "discretionary",
                          "type": "string",
                          "enum": [
                            "discretionary",
                            "signed_automation"
                          ]
                        },
                        "maxPreflightChecksPerMinute": {
                          "default": 4,
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 4
                        },
                        "maxPreflightChecksPerDay": {
                          "default": 40,
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "duplicateWindowSeconds": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 3600
                        }
                      },
                      "required": [
                        "agents",
                        "symbols",
                        "maxQty",
                        "maxOrderUsd",
                        "maxExposureUsd",
                        "maxRiskUsd",
                        "maxDailyLossUsd",
                        "maxEntriesPerDay",
                        "maxEntriesPerSymbol",
                        "maxPriceDeviationPct",
                        "expiresAt",
                        "resizeDown",
                        "minRetainedPct",
                        "syntheticProtectionAccepted",
                        "protectionSessions"
                      ],
                      "additionalProperties": false
                    },
                    "card_hash": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "halted",
                    "signed_at",
                    "card",
                    "card_hash"
                  ],
                  "additionalProperties": false
                }
              },
              "entries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "client_id": {
                      "type": "string"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "qty": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string"
                    },
                    "filled_qty": {
                      "type": "number"
                    },
                    "rule_id": {
                      "type": "string"
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "client_id",
                    "symbol",
                    "qty",
                    "status",
                    "filled_qty",
                    "rule_id",
                    "error"
                  ],
                  "additionalProperties": false
                }
              },
              "incidents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "connection": {
                "type": "object",
                "additionalProperties": true
              },
              "exitChecks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "required": [
              "draftLimits",
              "mandates",
              "entries",
              "incidents",
              "exitChecks"
            ],
            "additionalProperties": false
          },
          "protections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "state": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "state"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "environment",
          "now",
          "accountId",
          "positions",
          "orders",
          "gate",
          "protections"
        ],
        "additionalProperties": false
      }
    }
  ],
  "resultEnvelope": {
    "type": "object",
    "properties": {
      "content": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "const": "text"
            },
            "text": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "text"
          ],
          "additionalProperties": false
        }
      },
      "isError": {
        "type": "boolean"
      },
      "structuredContent": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "content"
    ],
    "additionalProperties": false
  },
  "errorHandling": {
    "http": {
      "400": "Malformed JSON, duplicate JSON keys or JSON-RPC batch; malformed member actor",
      "401": "Missing/invalid bearer or member signature",
      "404": "Path outside the public evaluation surface",
      "405": "Wrong method",
      "413": "Body exceeds 262144 bytes",
      "429": "Request/authentication rate limit",
      "500": "Unexpected internal failure"
    },
    "tool": "An isError=true result has explanatory text and no successful structured result. Treat it as failed, never as an order fill.",
    "decision": "BLOCK or HOLD is not a transport error. PASS or REPAIR still requires status inspection. Unknown/open is unresolved; do not retry with a new event ID.",
    "extensibility": "Incident records, connection diagnostics, simulated broker records and engine state are explicitly extensible objects. Do not depend on undocumented fields."
  },
  "quotas": {
    "requestsPerMinutePerKey": 120,
    "failedAuthenticationPerMinutePerIp": 30,
    "draftsPerMinute": 10,
    "draftsPerDay": 40,
    "pendingDraftsPerAccount": 100,
    "preflightPerMinuteDefault": 4,
    "preflightPerDayDefault": 40,
    "maxBodyBytes": 262144,
    "maxOrderPayloadBytes": 16384
  }
}
