run
Execute raw OpenSimulator console commands for region management, user administration, terrain editing, object manipulation, and HyperGrid operations not covered by other tools.
Instructions
Run any raw OpenSimulator console command. Use this for commands not covered by get/set categorization.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes |
Implementation Reference
- opensim_mcp/server.py:132-139 (handler)The 'run' tool handler: an async function that takes a command string and sends it directly to the OpenSimulator console API via the global console instance.@mcp.tool() async def run(command: str) -> str: """ Run any raw OpenSimulator console command. Use this for commands not covered by get/set categorization. """ return await console.send_command(command)
- opensim_mcp/server.py:132-132 (registration)The @mcp.tool() decorator registers the 'run' function as an MCP tool.@mcp.tool()
- opensim_mcp/server.py:133-135 (schema)Function signature and docstring defining the input (command: str) and output (str), with description for schema generation.async def run(command: str) -> str: """ Run any raw OpenSimulator console command.
- opensim_mcp/server.py:61-82 (helper)The send_command method of OpenSimConsole class, which performs the actual HTTP requests to send the command and retrieve response.async def send_command(self, command: str) -> str: if not self.session_id: await self.start_session() async with await self._get_client() as client: response = await client.post( f"{self.base_url}/SessionCommand/", data={"ID": self.session_id, "COMMAND": command}, ) if response.status_code != 200: raise Exception( f"Command failed: {response.status_code} - {response.text}" ) # Wait for command to be processed before reading response await asyncio.sleep(0.3) read_response = await client.post( f"{self.base_url}/ReadResponses/{self.session_id}/" ) return read_response.text