Skip to main content
Glama

Turn Zero Cloud for Backend & Hosting

Allow or remove outbound API

tzcloud_declare_outbound_api
Destructive

Declare or remove an outside API your application calls through the proxy. Its key must already be stored with tzcloud_store_secret. Where the manifest has upstreams, the API is declared there instead of with this tool.

Calls to /egress/v0/<upstream>/<path> use Authorization: Bearer with the platform credential or an egress key. The proxy adds the stored key. Code reads the gateway address and credential from settings. sdk_settings configures an unchanged SDK on each environment's next deploy, promote or tzcloud_restart_application. Declaration leaves running settings unchanged. Direct key binding in manifest settings is only for these exceptions. Your user requires the client's fixed host unchanged, or library source fixes it with no configurable gateway address. For that binding, declare no upstream and list its host in manifest egress. No check proves your code uses the proxy. Check the first call with tzcloud_read_logs for undeclared egress.

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": {
      "name": "<name>"
    },
    "name": "tzcloud_declare_outbound_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesUpstream name, unique within the account, and `<upstream>` in the proxy path. Reusing it revises the entry. Changing or removing an upstream the manifest's `upstreams` lists is refused `manifest_owned_field`.
removeNoWith `true`, takes `name` alone and frees it. This upstream's egress keys end in both environments. Calls from running copies stop after the cache interval. The stored key stays. Otherwise declares or revises.
base_urlNoRequired to declare: public `https://` base URL. The key applies under it. Mail ports are refused. Without a valid URL, a declaration is refused `invalid_request`. Omitted with `remove: true`.
settingsNoDeprecated alias of `sdk_settings`. Giving both is refused `invalid_request`.
applicationNoApplication id, required to declare, else `application_required`. A different application on revision is refused `binding_refused`.
auth_formatNoHeader value with `{value}` replaced by the key. Default: `{value}`.
auth_headerNoRequired to declare: the HTTP header that carries the key. Without a valid header name, a declaration is refused `invalid_request`. Omitted with `remove: true`.
token_shapeNoToken-count format of the upstream's responses. Omitted where it reports none.
sdk_settingsNoSettings filled for an unchanged client in a deployed container. Omission on revision keeps them. `null` or no `key` revokes this upstream's egress keys in both environments.
credential_nameNoRequired to declare: the key's stored name from `tzcloud_store_secret`. Without a valid name, a declaration is refused `invalid_request`. Omitted with `remove: true`.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description explains important mutation behavior: removal frees the name, ends egress keys in both environments, leaves the stored key, and running copies stop after a cache interval. It also clarifies that declaration does not change running settings and that `sdk_settings` applies on the next deploy, promote, or restart.

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 purpose is front-loaded and most sentences add relevant operational detail, but the description is dense and some exception sentences are awkwardly phrased and hard to parse. It would benefit from clearer separation of declaration behavior, removal behavior, and the manifest fallback.

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

Completeness5/5

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

For a destructive, 10-parameter mutation tool with no output schema, the description covers the necessary operational context: prerequisites, manifest-owned alternatives, egress key lifecycle, runtime effects, deployment timing, and how to verify undeclared egress. Nothing critical is omitted.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already carries detailed parameter semantics. The description adds useful context around `sdk_settings` and credential prerequisite behavior, but it does not meaningfully document the individual parameters beyond what the schema provides.

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 description opens with a specific verb-resource pair: declaring or removing an outside API called through the proxy. It distinguishes this tool from the manifest-driven declaration path and names `tzcloud_store_secret` as a prerequisite, so an agent can identify the tool's role 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?

It explicitly states the prerequisite that the key must already be stored with `tzcloud_store_secret`, and it gives the primary alternative: when the manifest has `upstreams`, the API is declared there instead. It also describes the exception for fixed-host libraries and directs verification to `tzcloud_read_logs`.

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