list_simdata
Retrieve a comprehensive list of simulation datasets available in the Fujitsu Social Digital Twin MCP Server for use as inputs in 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
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No |
Implementation Reference
- src/fujitsu_sdt_mcp/server.py:504-511 (handler)The primary handler function for the 'list_simdata' tool. Decorated with @mcp.tool() for registration in the MCP server. It creates an HTTP client, instantiates the FujitsuSocialDigitalTwinClient, calls get_simdata_list() to fetch simulation datasets from the '/api/simdata' endpoint, and returns the formatted 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
- Helper method in FujitsuSocialDigitalTwinClient class that performs the actual API call to GET /api/simdata to retrieve the list of simulation datasets, handles errors, and formats the response using format_simulation_result.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))