list_simdata
Retrieve the complete list of all simulation datasets available in the system to use as inputs for running new simulations.
Instructions
Returns a complete list of all simulation datasets available in the system, which can be used as inputs for running new simulations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No |
Implementation Reference
- src/fujitsu_sdt_mcp/server.py:504-511 (handler)The main tool handler function for 'list_simdata' — decorated with @mcp.tool(), it calls api_client.get_simdata_list() and returns the result.
@mcp.tool() async def list_simdata(ctx: Optional[Context] = None) -> Dict[str, Any]: """Returns a complete list of all simulation datasets available in the system, which can be used as inputs for running new simulations.""" async with await get_http_client() as client: api_client = FujitsuSocialDigitalTwinClient(client) result = await api_client.get_simdata_list() return result - The FujitsuSocialDigitalTwinClient.get_simdata_list() helper method that makes the actual HTTP GET /api/simdata call and wraps the response.
async def get_simdata_list(self) -> Dict[str, Any]: try: response = await self.client.get("/api/simdata") response.raise_for_status() return format_simulation_result(response.json()) except httpx.HTTPStatusError as e: logger.error(f"Simulation data list retrieval error: {e}") return format_api_error(e.response.status_code, str(e)) except Exception as e: logger.error(f"Unexpected error retrieving simulation data list: {e}") return format_api_error(500, str(e)) - src/fujitsu_sdt_mcp/server.py:504-505 (registration)The @mcp.tool() decorator registers 'list_simdata' as an MCP tool (same line as the handler definition).
@mcp.tool() async def list_simdata(ctx: Optional[Context] = None) -> Dict[str, Any]: - src/fujitsu_sdt_mcp/server.py:47-50 (helper)The format_simulation_result() helper wraps API responses into a standard success/data format.
def format_simulation_result(result: Dict[str, Any]) -> Dict[str, Any]: return { "success": True, "data": result