Skip to main content
Glama

deployment_targets

Manage per-environment, per-label service URLs: create, read, update, delete targets and set defaults so E2E and cross-environment promotions use database records, not env vars.

Instructions

CRUD for deployment targets (agent_deployment_targets) — per-(environment, label) service URLs the E2E runner and cross-env promote read instead of AI_AGENT_BASE_URL_* env vars. env selects which branch DB to operate on (client_for_env); environment is the row's own environment column (staging|prod, unique together with label) and defaults to env when omitted. action: list (optional environment filter) | get (target_id) | create (environment, label, base_url, ...) | update (target_id + fields) | delete (target_id, confirm=true). Setting is_default=true clears the default flag on every sibling row sharing the same environment (only one default per env), mirroring the portal's /admin/deployments Targets tab.

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

Input Schema

NameRequiredDescriptionDefault
envNoConfig branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves.staging
labelNoTarget label, unique per environment.
actionYesOperation to run: list | get | create | update | delete. The tool description lists what each action needs.
confirmNofalse (default) = dry run, nothing changes; true = execute.
base_urlNoService base URL, e.g. https://engine.example.com.
is_activeNoActive flag.
target_idNoagent_deployment_targets UUID.
is_defaultNoMake this the default target for its environment.
descriptionNoFree-text description.
environmentNoDEPRECATED alias of row_environment.
auth_env_varNoEnv var holding the target's auth token (name only).
row_environmentNoThe row's own `environment` column (staging|prod). '' = default to `env` (create) or leave unchanged (update).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses that `env` selects which branch database is read/written (staging vs prod — a real blast-radius warning), that is_default=true clears the flag on every sibling row, and that delete needs confirm=true. It does not state irreversibility of delete or permission/auth requirements, 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.

Conciseness4/5

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

Front-loaded with the resource definition, then the env/environment disambiguation, then the action table, then the is_default warning — a sensible order with no filler. It is dense to the point of being packed, but nearly every clause carries operational information.

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 a 12-parameter, five-action mutation tool with no annotations, the description covers the risky parts (prod branch writes, sibling-clearing default, dry-run vs execute) and an output schema handles return values. Remaining fields (is_active, auth_env_var, free-text description) are adequately self-documented in the schema, so nothing critical is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema: it resolves the confusing env-vs-environment distinction (row column vs branch selector, defaulting to `env` when omitted) and supplies the action-to-parameter mapping that the schema's own `action` description explicitly delegates to the tool description. The unique-(environment,label) constraint is also surfaced.

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?

Opens with a specific verb+resource ("CRUD for deployment targets") and immediately explains what the resource is: per-(environment, label) service URLs that the E2E runner and cross-env promote read instead of AI_AGENT_BASE_URL_* env vars. That concrete framing distinguishes it from nearby tools like env_vars without needing the sibling catalog.

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

Usage Guidelines4/5

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

The action enumeration with required arguments per action (list optional filter, get/delete by target_id, create by environment/label/base_url, update by target_id + fields) tells the agent exactly which mode to pick and what each needs. It stops short of explicit when-not guidance, e.g. no statement about when to prefer this over env_vars or promote_profile.

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