upsert_team
Add or update a Team · write tool
Adds a Team to workspace.yaml, or updates the fields (name, description, links) of an existing one; comments and formatting are kept.
| Field | Type | Required | Notes |
|---|---|---|---|
id |
string | yes | The Team’s bare id. |
fields |
map of id → any | Fields to set, as in YAML; null removes a field. Fields not given are left as they are. Default: {}. |
|
dry_run |
boolean | Check the write and return its diff without changing any file. Default: false. |
Output
Section titled “Output”| Field | Type | Required | Notes |
|---|---|---|---|
action |
"created" or "updated" or "removed" or "unchanged" |
yes | |
id |
string or null | yes | The qualified id written (bare for a Team, Environment or Project); null for a Deployment, or a Relationship without one. |
from |
string | ||
to |
string | ||
service |
string | ||
environment |
string | ||
target |
string | ||
files |
list of string | yes | |
diff |
string | yes | |
dryRun |
boolean | yes |
Example
Section titled “Example”Called over the Kitchen sink example Workspace.
Arguments:
{ "id": "billing", "fields": { "name": "Billing" }, "dry_run": true}Result:
{ "action": "created", "id": "billing", "files": [ "examples/kitchen-sink/archidocs/workspace.yaml" ], "dryRun": true, "diff": "(the patch below)"}The diff, as a patch:
--- a/examples/kitchen-sink/archidocs/workspace.yaml+++ b/examples/kitchen-sink/archidocs/workspace.yaml@@ -6,6 +6,8 @@ name: Edge data: name: Data+ billing:+ name: Billing environments: prod: name: ProductionErrors
Section titled “Errors”A call that fails returns isError: true, with {code, message, suggestions?} as structuredContent. This tool returns:
invalid_inputwhen the arguments don’t fit the input above.validation_failedwhen the write would add a check error. Nothing is written.read_onlywhen the server reads a published Workspace Bundle, or serves HTTP without--allow-writes.source_unavailablewhen the server can’t read the Workspace.
Error codes says what to do about each.
See also
Section titled “See also”Documents Archidocs v1.4.0, the latest release.