record_restore
DestructivePut one of a player's verified records back to how it was before one change (entry is the id from player_records' log): a document's earlier value, or its absence, or a counter's earlier value.
/api/agent/records/restoreBehavior
Put one of a player's verified records back to how it was before one change (entry is the id from player_records' log): a document's earlier value, or its absence, or a counter's earlier value. reason is required and kept in the player's log with who asked. It never writes a value of its own, only one the player's log holds, and it is refused when the game's kinds would refuse that value now. Use it for a record lost to a bug, after player_records.
Input parameters
playerRequiredstring- Pattern: ^w[a-f0-9]{16}$
entryRequiredinteger- Minimum: 1
- Maximum: 9007199254740991
reasonRequiredstring- Min. length: 3
- Max. length: 300
envOptional"public" | "preview"The descriptions above include conditional requirements. The full schema below shows structural validation; runtime checks also apply.
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"player": {
"type": "string",
"pattern": "^w[a-f0-9]{16}$"
},
"entry": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"env": {
"type": "string",
"enum": [
"public",
"preview"
]
}
},
"required": [
"player",
"entry",
"reason"
],
"additionalProperties": false
}Use its name in your connected MCP client. For the HTTP API, the route is relative to your Convex site URL and requires your agent key as a bearer token. Keep the key on the agent side, outside a game build.