JavaScript
Tool Sets
Delete a tool set
Permanently remove a tool set. It refuses while any variation still assigns it.
DELETE
JavaScript
Deletes a tool set and its tools for good. Use it for a set nothing depends on. For one still wired into an agent, archive instead.
A deleted tool set is gone: a later
To delete a set that is assigned, first remove the assignment or archive the set. The guard checks the actual assignments; a
Earlier this was a trap: deleting the agent left a dangling assignment that could not be removed, so the tool set became permanently undeletable. That is fixed. If you have an old tool set stuck this way, it was archived as the workaround; it can be deleted now.
GET is a 404. This is not the soft, reversible archive.
It refuses while assigned
A tool set assigned to any variation does not delete. The guard is a typed400:
400 means at least one variation still points at the set.
info.agentCount looks like the field to check here, but it currently always reads 0 even for an assigned set. Do not use it to predict a delete. To know whether a set is assigned, read its variations’ info.assignments, or attempt the delete and handle the 400.Deleting the agent clears the assignment
Deleting an agent cascades to its variations and their assignments, so a tool set is not stranded when the agent that used it goes away. Verified end to end:Archive versus delete
Reach for archive by default. It stops the sync, hides the set, and pulls its tools from objectives, while leaving assignments and history intact. Delete only when you are sure nothing needs the set or its history again.
Related
Archive a tool set
The reversible retirement, allowed even while assigned.
Remove an assignment
Clear the assignment that blocks a delete.
Get a tool set
The adapter, state, and tool counts on one set.
List tool sets
Archived sets appear under
?state=STATE_ARCHIVED.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace ID.
Example:
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
Tool set ID. Accepts the canonical ts_… form or the external_id: form.
Example:
"toolset_01HXKD2E5NQM3T9AYWCFNRMN74"