Validate a Bedrock command
validate_commandValidates a single Bedrock command line against the official command index: does the command exist, does the argument count match, are the selectors and block states valid. When no overload matches it returns the valid usages, and it tells you whether the command requires cheats. Run every command through this before giving it to the user. execute ... run <command> chains are resolved: the command after run is validated too, including nested execute.
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": {
"line": "<line>"
},
"name": "validate_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | A single command line, e.g. "/give @p diamond 1". The leading / is optional. | |
| version | No | Game version under data/, e.g. 1.26.40 or 1.26.40.5. Defaults to the newest available version. Marketing numbers (26.40) are rejected. |