Skip to main content
Glama

get_instance_details

Retrieve detailed information about a specific EC2 instance to monitor its status, configuration, and resource usage within AWS environments.

Instructions

Retrieves detailed information about a specific EC2 instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesThe ID of the EC2 instance.

Implementation Reference

  • Handler that retrieves detailed EC2 instance information using DescribeInstancesCommand and returns it as JSON.
    if (name === "get_instance_details") {
        const instanceId = (args as any).instance_id;
        const command = new DescribeInstancesCommand({ InstanceIds: [instanceId] });
        const response = await ec2Client.send(command);
    
        const instance = response.Reservations?.[0]?.Instances?.[0];
    
        if (!instance) {
            return { content: [{ type: "text", text: "Instance not found." }] };
        }
    
        return { content: [{ type: "text", text: JSON.stringify(instance, null, 2) }] };
    }
  • src/index.ts:283-293 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for get_instance_details.
    {
        name: "get_instance_details",
        description: "Retrieves detailed information about a specific EC2 instance.",
        inputSchema: {
            type: "object",
            properties: {
                instance_id: { type: "string", description: "The ID of the EC2 instance." }
            },
            required: ["instance_id"]
        }
    },
  • JSON schema for input validation: requires 'instance_id' string.
    inputSchema: {
        type: "object",
        properties: {
            instance_id: { type: "string", description: "The ID of the EC2 instance." }
        },
        required: ["instance_id"]
    }

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/bhaveshopss/MCP-server'

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