Skip to main content
Glama
3a3

Fujitsu Social Digital Twin MCP Server

by 3a3

get_simulation_result

Retrieve complete results and output files from a finished traffic simulation, including simulation status and generated result files.

Instructions

Retrieves the complete results and output files from a finished traffic simulation, including simulation status and generated result files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
simulation_idYes
ctxNo

Implementation Reference

  • MCP tool handler for 'get_simulation_result'. Decorated with @mcp.tool(). Calls the API client's get_simulation_result method, wraps result in success/error format.
    @mcp.tool()
    async def get_simulation_result(simulation_id: str, ctx: Optional[Context] = None) -> Dict[str, Any]:
        """Retrieves the complete results and output files from a finished traffic simulation, 
        including simulation status and generated result files."""
        try:
            if not simulation_id:
                return format_api_error(400, "simulationId required")
            
            async with await get_http_client() as client:
                api_client = FujitsuSocialDigitalTwinClient(client)
                result = await api_client.get_simulation_result(simulation_id)
            return result
        except Exception as e:
            logger.error(f"Result retrieval error: {e}")
            return format_api_error(500, str(e))
  • FujitsuSocialDigitalTwinClient.get_simulation_result() - Makes the actual HTTP GET request to /api/simulations/{simulation_id} and formats the response.
    async def get_simulation_result(self, simulation_id: str) -> Dict[str, Any]:
        try:
            response = await self.client.get(f"/api/simulations/{simulation_id}")
            response.raise_for_status()
            return format_simulation_result(response.json())
        except httpx.HTTPStatusError as e:
            logger.error(f"Simulation result retrieval error: {e}")
            return format_api_error(e.response.status_code, str(e))
        except Exception as e:
            logger.error(f"Unexpected error retrieving simulation results: {e}")
            return format_api_error(500, str(e))
  • The @mcp.tool() decorator registers 'get_simulation_result' as an MCP tool.
    @mcp.tool()
    async def get_simulation_result(simulation_id: str, ctx: Optional[Context] = None) -> Dict[str, Any]:
  • format_simulation_result helper used by get_simulation_result to wrap API responses in {success: True, data: ...} format.
    def format_simulation_result(result: Dict[str, Any]) -> Dict[str, Any]:
        return {
            "success": True,
            "data": result
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description only states it retrieves results, but does not disclose read-only nature, blocking behavior, or what happens if simulation is not finished. Minimal behavioral context beyond the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence of 16 words, efficient and front-loaded. No wasted words, but could benefit from slight restructuring to mention prerequisites or return type.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers main purpose but omits return format, error conditions, prerequisites (simulation must be finished), and relationships to sibling tools. Adequate but with clear gaps for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, and the description does not explain any parameter meaning. The required 'simulation_id' is not described (e.g., how to obtain it, format), and 'ctx' is not addressed. No value added beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool retrieves results and output files from a finished simulation, using specific verb 'retrieves' and resource 'complete results and output files'. It distinguishes from siblings like get_metrics and get_simdata by focusing on finished simulations and including status and files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage only after simulation is finished ('from a finished traffic simulation'), but provides no explicit when-to-use vs alternatives or when-not-to-use. No mention of sibling tools or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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