get_simdata
Retrieve detailed simulation dataset configurations, including region settings, time ranges, and scenario parameters, to analyze human and social behavior in digital space.
Instructions
Retrieves the complete configuration and parameter set for a specific simulation dataset, including region settings, time ranges, and scenario parameters.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No | ||
| simdata_id | Yes |
Implementation Reference
- src/fujitsu_sdt_mcp/server.py:513-527 (handler)The main handler function for the 'get_simdata' MCP tool. Decorated with @mcp.tool(), it validates input, creates an API client instance, calls the underlying get_simdata method, and formats the response.@mcp.tool() async def get_simdata(simdata_id: str, ctx: Optional[Context] = None) -> Dict[str, Any]: """Retrieves the complete configuration and parameter set for a specific simulation dataset, including region settings, time ranges, and scenario parameters.""" try: if not simdata_id: return format_api_error(400, "simdataId required") async with await get_http_client() as client: api_client = FujitsuSocialDigitalTwinClient(client) result = await api_client.get_simdata(simdata_id) return result except Exception as e: logger.error(f"Simdata retrieval error: {e}") return format_api_error(500, str(e))
- Supporting method in the FujitsuSocialDigitalTwinClient class that executes the actual HTTP GET request to the Fujitsu API endpoint /api/simdata/{simdata_id} and handles responses/errors.async def get_simdata(self, simdata_id: str) -> Dict[str, Any]: try: response = await self.client.get(f"/api/simdata/{simdata_id}") response.raise_for_status() return format_simulation_result(response.json()) except httpx.HTTPStatusError as e: logger.error(f"Simulation data 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: {e}") return format_api_error(500, str(e))
- src/fujitsu_sdt_mcp/server.py:513-513 (registration)The @mcp.tool() decorator registers the get_simdata function as an MCP tool with the name 'get_simdata'.@mcp.tool()