player_ban
WriteBan a player from the project's rooms, saves, reports and every score attributed to the id for hours (1 to 8760, a year), or lift a ban with hours 0; an anonymous score (posted with no token) is not a player and is not covered, which any client can post whether banned or not.
/api/agent/players/banBehavior
Ban a player from the project's rooms, saves, reports and every score attributed to the id for hours (1 to 8760, a year), or lift a ban with hours 0; an anonymous score (posted with no token) is not a player and is not covered, which any client can post whether banned or not. player is the pseudonymous id from the operator alert's body, players_list, or a room's join event; a signed-in player's ban follows their account across devices, a guest's ban only that browser's storage (set rooms_configure signed_in_only when that matters).
It takes effect at the player's next token, within 15 minutes; a connection already open is closed when its token expires. A ban resolves the reports filed against that player (rooms_status's reports_open). reason is for the deployer and operators, not shown to the player. Bans are the deployer's decision: reports never ban on their own.
Input parameters
playerRequiredstring- Pattern: ^[gw][a-f0-9]{16}$
hoursRequiredinteger- Minimum: 0
- Maximum: 8760
reasonRequiredstring- Max. length: 200
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": "^[gw][a-f0-9]{16}$"
},
"hours": {
"type": "integer",
"minimum": 0,
"maximum": 8760
},
"reason": {
"type": "string",
"maxLength": 200
}
},
"required": [
"player",
"hours",
"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.