get
Retrieve information from OpenSimulator servers using console commands to show version, uptime, regions, users, or monitoring reports.
Instructions
Run a read-only/info/show style command.
Examples:
show version
show uptime
show regions
show users full
monitor report
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| args | No |
Implementation Reference
- opensim_mcp/server.py:102-115 (handler)The handler function for the MCP tool named 'get'. It constructs a command string and sends it to the OpenSimulator console via the global 'console' instance for read-only operations.@mcp.tool() async def get(command: str, args: str = "") -> str: """ Run a read-only/info/show style command. Examples: - show version - show uptime - show regions - show users full - monitor report """ return await console.send_command(_build_command(command, args))
- opensim_mcp/server.py:96-100 (helper)Helper function used by the 'get' tool (and others) to build the full console command from base command and optional arguments.def _build_command(base: str, args: str = "") -> str: base = base.strip() args = args.strip() return f"{base} {args}".strip()
- opensim_mcp/server.py:61-82 (helper)Core helper method in OpenSimConsole class that sends the command to the REST API, manages session, and retrieves the response. Called by the 'get' tool.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
- opensim_mcp/server.py:102-103 (registration)The @mcp.tool() decorator registers the 'get' function as an MCP tool.@mcp.tool() async def get(command: str, args: str = "") -> str: