Write to a route
tzcloud_write_routeSend HTTP POST, PUT, PATCH or DELETE to your deployed application when your shell cannot.
With real users, confirm production writes with the owner except first-deploy test-user checks and cleanup. Unattended, require the owner's own request for this run naming that write on production. With none, test development, else production. Email beyond test addresses in this run's request, the account's verified email or its plus addresses needs that request. Paid outside calls with stored keys do too.
environment is required. test_end_user supplies a temporary session for any signed-in route. session_as bearer sends it as a bearer token. Without a session, a 401 on invited or workforce routes outside session-free paths may be the router's gate.
After route_unreachable with timeout or connect_failed, the write may have run. A retry needs evidence that it did not.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"application": "<application>",
"environment": "<environment>"
},
"name": "tzcloud_write_route"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Text body, at most 64 KiB in UTF-8. Its `content-type` goes in `headers`. | |
| path | No | One request uses `path`, a batch uses `routes`. Paths start with one `/` and may include a query. Leading `//`, spaces and control characters are refused `invalid_request`. | |
| method | No | Required for a single request. `GET` is refused, with reads through `tzcloud_request_route`. | |
| routes | No | Ordered batch. `max_body_bytes` and `test_end_user` stay at the top level; one sign-in serves the list. No top-level `method`, `path`, `headers`, `body` or `follow_redirects`. Each entry counts toward 60 shared requests per clock minute. Response body per entry: 12 KiB; list: 60 s. | |
| headers | No | No line breaks. Refused `invalid_request`: `accept-encoding`, `host`, `content-length`, hop headers, and `x-forwarded-`, `x-azure-`, `x-fd-`, `x-envoy-`, `x-k8se-`, `x-ms-containerapp-`, `x-turnzero-cloud-` except `x-turnzero-cloud-client`, or `x-app-cloud-`. | |
| session_as | No | How to send the test user's session: `cookie` by default, or `bearer` as `Authorization: Bearer` with no cookie. Needs `test_end_user`; with `bearer`, omit your own `authorization` header. | |
| application | Yes | Your account's application `id` from `tzcloud_list_applications`, not its name or label. | |
| environment | Yes | Required target environment. Omission is refused `invalid_request`, an absent environment `environment_not_created`, and one without a version `never_deployed`. | |
| test_end_user | No | Test user's id or label for a temporary session on this request and same-host redirects, under `tzcloud_sign_in_test_end_user`'s rules. Needs `environment`, without a `cookie` header. | |
| max_body_bytes | No | Decoded response bytes returned. It only lowers the cap: 64 KiB for one request, 12 KiB per batch entry. Zero returns status and headers alone. | |
| follow_redirects | No | Default true. False returns a same-host redirect with its status and `location`. |