{"openapi":"3.1.0","info":{"title":"Trade Routes API","version":"0.1.0","description":"A real, playable, fully local trading-and-logistics economy sim — 4 cities each with independent, specialized prices for 3 goods that move via genuine linear supply/demand price impact and drift back toward baseline over time, real travel cost and time, and real inventory-capacity-enforced buy/sell. Fully stateless — every tool call passes the full game state.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://traderoutes.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/traderoutes/docs"},"termsOfService":"https://connectorbay.com/traderoutes/terms"},"servers":[{"url":"https://traderoutes.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/traderoutes/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/new_game":{"post":{"operationId":"new_game","summary":"Starts a new Trade Routes game with starting gold and empty inventory at `start_city`, and","description":"Starts a new Trade Routes game with starting gold and empty inventory at `start_city`, and\n    returns the initial `state`. Use for \"let's play a trading game\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_city":{"default":"Northport","description":"Starting city.","examples":["Northport","Ironhold","Sunmarket","Rivertown"],"title":"Start City","type":"string"}},"title":"new_gameArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/travel":{"post":{"operationId":"travel","summary":"Travels to `destination`: deducts real gold (scaled by distance) and advances real travel","description":"Travels to `destination`: deducts real gold (scaled by distance) and advances real travel\n    time, letting every city's prices drift toward baseline along the way. Use for \"travel to\n    Ironhold\", \"head to Sunmarket\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"},"destination":{"description":"City to travel to.","examples":["Ironhold"],"title":"Destination","type":"string"}},"required":["state","destination"],"title":"travelArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/buy":{"post":{"operationId":"buy","summary":"Buys `qty` units of `good` at the current city. Cost reflects real price impact (buying","description":"Buys `qty` units of `good` at the current city. Cost reflects real price impact (buying\n    raises the price) and real gold/capacity limits. Use for \"buy 20 grain\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"},"good":{"description":"Good to buy.","examples":["grain","cloth","iron"],"title":"Good","type":"string"},"qty":{"description":"Units to buy.","exclusiveMinimum":0,"title":"Qty","type":"integer"}},"required":["state","good","qty"],"title":"buyArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/sell":{"post":{"operationId":"sell","summary":"Sells `qty` units of `good` at the current city. Proceeds reflect real price impact (selling","description":"Sells `qty` units of `good` at the current city. Proceeds reflect real price impact (selling\n    lowers the price) and require you to actually hold the goods. Use for \"sell 20 grain\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"},"good":{"description":"Good to sell.","examples":["grain","cloth","iron"],"title":"Good","type":"string"},"qty":{"description":"Units to sell.","exclusiveMinimum":0,"title":"Qty","type":"integer"}},"required":["state","good","qty"],"title":"sellArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/advance_turn":{"post":{"operationId":"advance_turn","summary":"Waits one turn without traveling, still applying real baseline price drift to every city.","description":"Waits one turn without traveling, still applying real baseline price drift to every city.\n    Use for \"wait a turn\", \"let the market move\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"}},"required":["state"],"title":"advance_turnArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_status":{"post":{"operationId":"get_status","summary":"Structured numeric status: gold, inventory, local prices, net worth and realized profit. Use","description":"Structured numeric status: gold, inventory, local prices, net worth and realized profit. Use\n    for \"what's my current status\", \"how much profit have I made\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"}},"required":["state"],"title":"get_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_markets":{"post":{"operationId":"list_markets","summary":"Current prices for every good in every city — use this to spot arbitrage opportunities. Use","description":"Current prices for every good in every city — use this to spot arbitrage opportunities. Use\n    for \"what are the prices everywhere\", \"where's grain cheapest\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"}},"required":["state"],"title":"list_marketsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/render_game":{"post":{"operationId":"render_game","summary":"A human-readable status summary — show this to the player, not raw state. Use for \"how am I","description":"A human-readable status summary — show this to the player, not raw state. Use for \"how am I\n    doing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by a previous call in this connector.","title":"State","type":"object"}},"required":["state"],"title":"render_gameArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/game_rules":{"post":{"operationId":"game_rules","summary":"Explains every price-impact, drift, travel-cost and capacity formula, with no live game","description":"Explains every price-impact, drift, travel-cost and capacity formula, with no live game\n    needed. Use for \"how does this game work\", \"what are the formulas\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"game_rulesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}