Move a project to the trash, or restore it with restore=true.
Behaviour#
These are the annotations of the tool definition, the hints a client uses to decide whether to ask before a call. project_trash is listed by tools/list.
| Property | Value |
|---|---|
| Read only | no |
| Destructive | no |
| Idempotent | yes |
| Reaches outside the workspace | no |
Input#
| Argument | Type | Required | Notes |
|---|---|---|---|
project_id | string | yes | pattern ^prj_[0-9a-hjkmnp-tv-z]{10}$ |
restore | boolean | no | default false |
Output#
A result has a text block, written for the model, and structured content with these members.
| Member | Type | Always present | Notes |
|---|---|---|---|
project_id | string | yes | |
state | active, trashed | yes |
Errors#
A call over HTTP without credentials fails with E_UNAUTHORIZED, and too many calls with E_RATE_LIMITED. Both are in the error codes.
Safety#
- Nothing is deleted for good: the project and its history stay intact, and
restorebrings the project back.
Next steps#
Ask the agent
Move the project Launch teaser to the trash.
The call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "project_trash",
"arguments": {
"project_id": "prj_7k2m9x4q1b"
}
}
}The result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "…"
}
],
"structuredContent": {
"project_id": "prj_7k2m9x4q1b",
"state": "trashed"
}
}
}The values are illustrative. The text block holds the same result written for the model; its wording is left out here.