Skip to main content
Glama

editor_console_command

Execute console commands directly within Unreal Engine's editor to control game behavior, modify settings, or trigger actions without manual input.

Instructions

Run a console command in Unreal

Example output: (No output for most commands, executed silently)

Executes the console command without returning output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes

Implementation Reference

  • Python script executed in Unreal Editor that runs the provided console command using unreal.SystemLibrary.execute_console_command.
    import unreal def execute_console_command(command: str) -> None: unreal.SystemLibrary.execute_console_command(None, command) def main(): execute_console_command("${command}") if __name__ == "__main__": main()
  • Zod schema defining the input parameter 'command' as a string for the tool.
    { command: z.string() },
  • Registers the 'editor_console_command' tool with the MCP server, including description, input schema, and handler function that delegates to editorTools.UEConsoleCommand.
    server.tool( "editor_console_command", "Run a console command in Unreal\n\nExample output: (No output for most commands, executed silently)\n\nExecutes the console command without returning output.", { command: z.string() }, async ({ command }) => { const result = await tryRunCommand(editorTools.UEConsoleCommand(command)) return { content: [ { type: "text", text: result, }, ], } }, )
  • Helper function that reads the ue_console_command.py script and templates it with the provided command string to generate executable Python code.
    export const UEConsoleCommand = (command: string) => Template(read("./scripts/ue_console_command.py"), { command })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/runreal/unreal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server