{
 "protocolVersion": "1",
 "tools": [
  {
   "name": "contract_get",
   "description": "A play's contract, with the instruction to attack your own output before submitting.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string"
     }
    },
    "required": [
     "slug"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  },
  {
   "name": "goal_submit",
   "description": "Submit a goal to the goal contract. A failing goal returns its named checks.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "registryId": {
      "type": "string"
     },
     "targetDate": {
      "type": "string"
     },
     "dateKind": {
      "type": "string",
      "enum": [
       "deadline",
       "forecast"
      ]
     },
     "target": {
      "type": "number"
     },
     "parentId": {
      "type": "string"
     },
     "stretch": {
      "type": "boolean"
     },
     "rank": {
      "type": "number"
     }
    },
    "required": [
     "registryId",
     "targetDate",
     "dateKind"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  },
  {
   "name": "goal_trees",
   "description": "Propose candidate goal trees for the builder's stage. Ask the regret question first.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "stage": {
      "type": "string"
     },
     "regret": {
      "type": "string"
     }
    },
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  },
  {
   "name": "plan_next",
   "description": "The ranked next steps toward the root goal, each with its reason.",
   "inputSchema": {
    "type": "object",
    "properties": {}
   }
  },
  {
   "name": "proposal_keep",
   "description": "The builder keeps a proposed value.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "factId": {
      "type": "string"
     }
    },
    "required": [
     "factId"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  },
  {
   "name": "record_export",
   "description": "Export the whole record in the protocol's record format.",
   "inputSchema": {
    "type": "object",
    "properties": {}
   }
  },
  {
   "name": "record_read",
   "description": "Read the workspace's current facts with their provenance, confidence, and observed-at.",
   "inputSchema": {
    "type": "object",
    "properties": {}
   }
  },
  {
   "name": "record_write",
   "description": "Write a fact. A connected AI's write over an existing value becomes a proposal the builder keeps.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string"
     },
     "value": {},
     "provenance": {
      "type": "string",
      "enum": [
       "real",
       "estimated",
       "illustrative",
       "derived"
      ]
     },
     "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
     }
    },
    "required": [
     "key",
     "value"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  },
  {
   "name": "run_start",
   "description": "Start a run of a play. The executor gates it on budget and pins its contract.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string"
     },
     "estimatedTokens": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
     }
    },
    "required": [
     "slug"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  },
  {
   "name": "run_submit",
   "description": "Submit an output for a run. It passes the floor and then the judgment its stakes require.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "runId": {
      "type": "string"
     },
     "submission": {}
    },
    "required": [
     "runId",
     "submission"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
   }
  }
 ]
}
