Skip to main content
Glama
RadiumGu
by RadiumGu

get_experiment

Retrieve detailed information about a specific AWS Fault Injection Service experiment by providing its ID, including status, configuration, and results.

Instructions

Get detailed information about a specific AWS FIS experiment.

Args:
    experiment_id: ID of the experiment to retrieve
    region: AWS region to query (default: us-east-1)
    
Returns:
    JSON string containing detailed experiment information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
experiment_idYes
regionNous-east-1

Implementation Reference

  • The core handler function implementing the 'get_experiment' MCP tool. It fetches experiment details from AWS FIS using boto3, serializes datetime objects, and returns formatted JSON.
    def get_experiment(experiment_id: str, region: str = "us-east-1") -> str:
        """
        Get detailed information about a specific AWS FIS experiment.
        
        Args:
            experiment_id: ID of the experiment to retrieve
            region: AWS region to query (default: us-east-1)
            
        Returns:
            JSON string containing detailed experiment information
        """
        try:
            fis = boto3.client('fis', region_name=region)
            response = fis.get_experiment(id=experiment_id)
            
            # Get the raw experiment data
            experiment = response.get('experiment', {})
            
            # Use the recursive datetime serializer to handle all datetime objects
            serialized_experiment = _serialize_datetime(experiment)
            
            return json.dumps(serialized_experiment, indent=2)
        except Exception as e:
            return f"Error retrieving experiment: {str(e)}"
  • Registration of the 'get_experiment' tool using FastMCP's app.tool() decorator, which registers the function as an MCP tool with the name 'get_experiment'.
    app.tool()(get_experiment)
  • Helper function used by get_experiment to recursively serialize datetime objects in the AWS response to ISO strings for proper JSON output.
    def _serialize_datetime(obj: Any) -> Any:
        """
        Recursively serialize datetime objects to ISO format strings.
        
        Args:
            obj: Object that may contain datetime objects
            
        Returns:
            Object with datetime objects converted to ISO format strings
        """
        if isinstance(obj, datetime):
            return obj.isoformat()
        elif isinstance(obj, dict):
            return {key: _serialize_datetime(value) for key, value in obj.items()}
        elif isinstance(obj, list):
            return [_serialize_datetime(item) for item in obj]
        else:
            return obj
  • Import of the get_experiment handler function from tools.py into server.py for registration as an MCP tool.
    from aws_fis_mcp.tools import (
        list_experiment_templates,
        get_experiment_template,
        list_experiments,
        get_experiment,
        start_experiment,
        stop_experiment,
        create_experiment_template,
        delete_experiment_template,
        list_action_types,
        generate_template_example,
        set_write_mode,
    )
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it retrieves information without disclosing behavioral traits like authentication needs, rate limits, error handling, or data freshness. It mentions the return format as 'JSON string,' which adds some context but lacks depth for a read operation in a cloud service.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded, with the core purpose stated first, followed by clear sections for Args and Returns. Every sentence earns its place by providing essential information without redundancy or fluff.

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?

Given the tool's moderate complexity (read operation with 2 parameters), no annotations, and no output schema, the description is minimally adequate. It covers the purpose and parameters but lacks details on authentication, errors, or sibling tool differentiation, leaving gaps for an AI agent to infer usage.

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

Parameters4/5

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

The description adds meaningful semantics beyond the input schema, which has 0% coverage. It explains that 'experiment_id' is for retrieving a specific experiment and 'region' is the AWS region to query with a default, clarifying their roles. Since there are only 2 parameters and the schema lacks descriptions, this compensation is effective.

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

Purpose4/5

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

The description clearly states the tool's purpose as 'Get detailed information about a specific AWS FIS experiment,' which includes a specific verb ('Get') and resource ('AWS FIS experiment'). It distinguishes from siblings like 'list_experiments' by focusing on a single experiment rather than listing multiple, but doesn't explicitly mention all sibling differences.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'get_experiment' over 'list_experiments' for overviews or other siblings for related operations, leaving usage context implied rather than explicit.

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/RadiumGu/aws-fis-mcp-server'

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