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
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Config branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves. | staging |
| label | No | Target label, unique per environment. | |
| action | Yes | Operation to run: list | get | create | update | delete. The tool description lists what each action needs. | |
| confirm | No | false (default) = dry run, nothing changes; true = execute. | |
| base_url | No | Service base URL, e.g. https://engine.example.com. | |
| is_active | No | Active flag. | |
| target_id | No | agent_deployment_targets UUID. | |
| is_default | No | Make this the default target for its environment. | |
| description | No | Free-text description. | |
| environment | No | DEPRECATED alias of row_environment. | |
| auth_env_var | No | Env var holding the target's auth token (name only). | |
| row_environment | No | The row's own `environment` column (staging|prod). '' = default to `env` (create) or leave unchanged (update). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |