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 })
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that commands execute silently with no output for most commands, which is useful context about the tool's behavior. However, it doesn't disclose critical traits like whether this is a read-only or destructive operation, potential side effects, permission requirements, or error handling. For a tool that runs arbitrary console commands in Unreal, this is a significant gap in safety and operational transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with three short sentences that each serve a purpose: stating the action, providing output expectations, and reinforcing execution behavior. It's front-loaded with the core purpose. While efficient, the second sentence about example output could be integrated more smoothly rather than as a parenthetical note.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of running arbitrary console commands in Unreal Engine, no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It lacks crucial information about safety, side effects, command syntax, error conditions, and what 'executed silently' means operationally. The description doesn't provide enough context for safe or effective use of this potentially powerful/destructive tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate. It mentions 'command' as a parameter in the context of running console commands, but provides no semantic details about what constitutes a valid command, format requirements, or examples beyond the generic mention. This leaves the single required parameter largely undocumented, failing to adequately compensate for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Run a console command') and the context ('in Unreal'), which is a specific verb+resource combination. It distinguishes this tool from siblings like editor_run_python or editor_create_object by focusing on console commands rather than Python scripts or object manipulation. However, it doesn't explicitly differentiate from all siblings (e.g., it could mention this is for Unreal Engine's console vs. other command execution tools).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer editor_console_command over editor_run_python for similar tasks, nor does it specify prerequisites or contexts where console commands are appropriate. The example output note hints at usage but doesn't provide explicit when/when-not instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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