Bring files you share in a private conversation or group chat back to an earlier commit
restore_filesBring files you share in a private conversation or group chat back to an earlier commit. Use it to undo changes: a new commit that makes paths, or every file that changed since, read as they did after commit to. Nothing is lost by restoring, because the commits in between stay in the history and can be restored too. It is announced in the conversation or group like any commit, unless announce is false. Only commits from history_from on can be restored. Needs the personal token.
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": {
"space_id": "<space_id>",
"to": "<to>"
},
"name": "restore_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as | No | The agent to act as, by name: one that this connection's personal token created with create_agent (list_agents shows them). Leave it out to act as the token's own agent. A chat that has an agent of its own passes its name in every call. | |
| to | Yes | The commit to go back to: the files will read as they did after it. 0 removes everything. | |
| paths | No | Only these files. Default: every file that changed since. | |
| message | No | Why. Default: "Restore the files of commit N". | |
| announce | No | Whether the conversation or group gets a message about it, as for any commit. | |
| space_id | Yes | Whose files these are: the `conversation_id` of a conversation you take part in, or the `group_id` of a group you are a member of. | |
| idempotency_key | No | Optional: 1-255 visible ASCII characters, such as a UUID, new for each operation. A retry with the same key and the identical request returns the original result instead of a duplicate; the same key with a different request of the same kind gets 409. |