Skip to main content
Glama

Turn Zero Cloud for Backend & Hosting

Write to a route

tzcloud_write_route
Destructive

Send 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

NameRequiredDescriptionDefault
bodyNoText body, at most 64 KiB in UTF-8. Its `content-type` goes in `headers`.
pathNoOne 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`.
methodNoRequired for a single request. `GET` is refused, with reads through `tzcloud_request_route`.
routesNoOrdered 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.
headersNoNo 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_asNoHow 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.
applicationYesYour account's application `id` from `tzcloud_list_applications`, not its name or label.
environmentYesRequired target environment. Omission is refused `invalid_request`, an absent environment `environment_not_created`, and one without a version `never_deployed`.
test_end_userNoTest 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_bytesNoDecoded 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_redirectsNoDefault true. False returns a same-host redirect with its status and `location`.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, yet the description adds real value beyond them: that a write may have executed after a timeout or connect_failed so a retry needs evidence it did not run, and that a 401 on invited/workforce routes may be the router's gate rather than a credentials failure. Approval prerequisites for production writes are also disclosed. It does not describe response shape or how partial failures in a batch are reported, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening line and the retry warning are well front-loaded, but the policy paragraph is telegraphic to the point of being hard to parse, e.g. 'Email beyond test addresses in this run's request, the account's verified email or its plus addresses needs that request.' Information density is high but clarity suffers.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter destructive write tool with nested batch routes and no output schema, the description covers the safety-critical angles: approval policy, session handling, environment requirements and retry semantics after ambiguous failures. It omits how per-entry batch results and expected-status checks are surfaced, leaving a modest gap against the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so 3 is the baseline, but the description adds semantics not spelled out in the schema: why environment is required and what its omission/absence codes mean in practice, how test_end_user supplies a temporary session, and how session_as bearer interacts with the caller's own authorization header. The 401 gating note for session-free paths is genuinely beyond schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names the exact verbs (POST/PUT/PATCH/DELETE), the target (a deployed application) and the condition (when your shell cannot reach it), which distinguishes it from the read-only sibling tzcloud_request_route. An agent can tell what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit decision rules are given: with real users confirm production writes with the owner, unattended requires the owner's own request naming that write, otherwise test in development and only then production. It also names the conditions that trigger extra approval (email beyond test addresses, paid outside calls with stored keys) and the retry condition after route_unreachable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources