Skip to main content
Glama

list_vpcs

Retrieve all Virtual Private Clouds (VPCs) in your current AWS region to manage network configurations and resources.

Instructions

Lists all VPCs in the current region.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'list_vpcs' tool. It sends a DescribeVpcsCommand to the EC2 client, maps the response to include key fields like VpcId, CidrBlock, IsDefault, State, and Name tag, then returns the formatted JSON.
    if (name === "list_vpcs") {
        const command = new DescribeVpcsCommand({});
        const response = await ec2Client.send(command);
    
        const vpcs = response.Vpcs?.map(v => ({
            VpcId: v.VpcId,
            CidrBlock: v.CidrBlock,
            IsDefault: v.IsDefault,
            State: v.State,
            Name: v.Tags?.find(t => t.Key === "Name")?.Value
        })) || [];
    
        return { content: [{ type: "text", text: JSON.stringify(vpcs, null, 2) }] };
    }
  • src/index.ts:294-301 (registration)
    Registration of the 'list_vpcs' tool in the ListTools handler response, defining its name, description, and input schema (no parameters required).
    {
        name: "list_vpcs",
        description: "Lists all VPCs in the current region.",
        inputSchema: {
            type: "object",
            properties: {}
        }
    },
  • Input schema for the 'list_vpcs' tool, which requires no parameters (empty properties).
    inputSchema: {
        type: "object",
        properties: {}
    }
  • Import of DescribeVpcsCommand and EC2Client used by the list_vpcs handler.
    import { EC2Client, DescribeInstancesCommand, DescribeSecurityGroupsCommand, DescribeAddressesCommand, DescribeVolumesCommand, DescribeVpcsCommand, DescribeSubnetsCommand, DescribeRouteTablesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand } from "@aws-sdk/client-ec2";
  • Initialization of the shared EC2Client instance used by the list_vpcs handler.
    const ec2Client = new EC2Client({});
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 the basic action without disclosing behavioral traits like pagination, rate limits, permissions required, or output format. It mentions regional scope, which adds some context, but overall transparency is limited.

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 a single, efficient sentence with no wasted words, clearly front-loading the core action and scope. It's appropriately sized for a simple listing tool with no parameters.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but lacks depth. It covers the basic purpose and scope but misses details like output structure, error handling, or integration with siblings, leaving gaps for an AI agent.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, aligning with the minimal requirement for such cases.

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 action ('Lists') and resource ('all VPCs') with regional scope ('in the current region'), making the purpose specific and understandable. However, it doesn't differentiate from sibling tools like 'list_subnets' or 'list_security_groups' beyond the resource type, missing explicit sibling comparison.

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?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites, alternatives for filtered listings, or regional constraints beyond the implicit scope, offering minimal usage direction.

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

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