game_command
Executes a registered game command on the Flax editor's main thread, returning text output and clear errors for unknown names or handler failures.
Instructions
Runs a registered game command on the editor's main thread and returns its text result. Errors: unknown_command (lists the registered names), command_failed (the handler's exception type and message).
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": {
"name": "<name>"
},
"name": "game_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | The argument string the command's description asks for. | |
| name | Yes | The command name, as game_commands lists it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| result | Yes | ||
| isPlayMode | Yes | ||
| mainThreadId | Yes | ||
| milliseconds | Yes |