Skip to main content
Glama
3a3

Fujitsu Social Digital Twin MCP Server

by 3a3

list_simulations

Retrieve detailed information on all traffic simulations, including IDs, names, status, and execution timeframes, within the Fujitsu Social Digital Twin MCP Server for analysis and management.

Instructions

Returns a comprehensive list of all traffic simulations in the system, including their IDs, names, status, and execution timeframes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctxNo

Implementation Reference

  • The primary handler function for the 'list_simulations' tool. Decorated with @mcp.tool() for registration and executes the logic by instantiating FujitsuSocialDigitalTwinClient and calling its get_simulations method.
    async def list_simulations(ctx: Optional[Context] = None) -> Dict[str, Any]:
        """Returns a comprehensive list of all traffic simulations in the system, 
        including their IDs, names, status, and execution timeframes."""
        async with await get_http_client() as client:
            api_client = FujitsuSocialDigitalTwinClient(client)
            result = await api_client.get_simulations()
        return result
  • Supporting utility method in FujitsuSocialDigitalTwinClient class that performs the HTTP GET request to '/api/simulations' and handles responses/errors, formatting the result.
    async def get_simulations(self) -> Dict[str, Any]:
        try:
            response = await self.client.get("/api/simulations")
            response.raise_for_status()
            return format_simulation_result(response.json())
        except httpx.HTTPStatusError as e:
            logger.error(f"Simulation list retrieval error: {e}")
            return format_api_error(e.response.status_code, str(e))
        except Exception as e:
            logger.error(f"Unexpected error retrieving simulations: {e}")
            return format_api_error(500, str(e))
  • Helper function to format successful API responses into a standard structure with success=True and data.
    def format_simulation_result(result: Dict[str, Any]) -> Dict[str, Any]:
        return {
            "success": True,
            "data": result
        }
  • Utility to create and return configured httpx.AsyncClient for API calls.
    async def get_http_client():
        return httpx.AsyncClient(
            base_url=FUJITSU_API_BASE_URL,
            headers={
                "Content-Type": "application/json",
                "Authorization": f"Bearer {FUJITSU_API_KEY}"
            },
            timeout=30.0
        )
  • The @mcp.tool() decorator registers the list_simulations function as an MCP tool.
    async def list_simulations(ctx: Optional[Context] = None) -> Dict[str, Any]:

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