Skip to main content
Glama
3a3

Fujitsu Social Digital Twin MCP Server

by 3a3

start_simulation

Initiate traffic simulations using specified dataset configurations on the Fujitsu Social Digital Twin MCP Server, generating a simulation ID and status for analysis.

Instructions

Launches a new traffic simulation using the provided simulation dataset configuration, returning the simulation ID and initial status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctxNo
simdata_idYes

Implementation Reference

  • The MCP tool handler for 'start_simulation'. It validates the simdata_id, creates a FujitsuSocialDigitalTwinClient instance, and delegates to the client's start_simulation method.
    @mcp.tool()
    async def start_simulation(simdata_id: str, ctx: Optional[Context] = None) -> Dict[str, Any]:
        """Launches a new traffic simulation using the provided simulation dataset configuration, 
        returning the simulation ID and initial status."""    
        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.start_simulation(simdata_id)
            return result
        except Exception as e:
            logger.error(f"Simulation start error: {e}")
            return format_api_error(500, str(e))
  • Supporting method in FujitsuSocialDigitalTwinClient class that makes the HTTP POST request to the Fujitsu API endpoint '/api/simulations' to initiate the simulation.
    async def start_simulation(self, simdata_id: str) -> Dict[str, Any]:
        try:
            response = await self.client.post(
                "/api/simulations", 
                json={"simdataId": simdata_id}
            )
            response.raise_for_status()
            return format_simulation_result(response.json())
        except httpx.HTTPStatusError as e:
            logger.error(f"Simulation start error: {e}")
            return format_api_error(e.response.status_code, str(e))
        except Exception as e:
            logger.error(f"Unexpected error starting simulation: {e}")
            return format_api_error(500, str(e))

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/3a3/fujitsu-sdt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server