Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

aws_list_lambda_functions

Retrieve all AWS Lambda functions in a specified region to manage serverless resources and monitor deployments.

Instructions

List all Lambda functions in AWS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoAWS regionus-east-1

Implementation Reference

  • Core handler implementation that initializes AWS LambdaClient, executes ListFunctionsCommand, maps AWS response to LambdaFunction objects, and handles errors.
    async listLambdaFunctions(): Promise<LambdaFunction[]> {
      await this.initializeClients();
      if (!this.lambdaClient) throw new Error('Lambda client not initialized');
    
      try {
        const command = new ListFunctionsCommand({});
        const response = await this.lambdaClient.send(command);
    
        const functions: LambdaFunction[] = [];
    
        for (const func of response.Functions || []) {
          functions.push({
            id: func.FunctionArn || '',
            type: 'function',
            name: func.FunctionName || '',
            region: this.region,
            status: 'running',
            functionName: func.FunctionName || '',
            runtime: func.Runtime || '',
            memorySize: func.MemorySize,
            timeout: func.Timeout,
            lastModified: func.LastModified ? new Date(func.LastModified) : undefined,
          });
        }
    
        return functions;
      } catch (error) {
        throw new Error(`Failed to list Lambda functions: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • Tool-specific handler case within handleAWSTool that calls the AWS adapter and formats the response with total count and simplified function list.
    case 'aws_list_lambda_functions': {
      const functions = await adapter.listLambdaFunctions();
      return {
        total: functions.length,
        functions: functions.map((func) => ({
          id: func.id,
          name: func.functionName,
          runtime: func.runtime,
          memorySize: func.memorySize,
          timeout: func.timeout,
          region: func.region,
        })),
      };
    }
  • Tool registration entry in awsTools array, including name, description, and input schema for optional region parameter.
    {
      name: 'aws_list_lambda_functions',
      description: 'List all Lambda functions in AWS',
      inputSchema: {
        type: 'object',
        properties: {
          region: {
            type: 'string',
            description: 'AWS region',
            default: 'us-east-1',
          },
        },
      },
    },
  • TypeScript interface defining the structure of LambdaFunction objects returned by the tool.
    export interface LambdaFunction extends AWSResource {
      type: 'function';
      functionName: string;
      runtime: string;
      memorySize?: number;
      timeout?: number;
      lastModified?: Date;
    }
  • src/server.ts:64-65 (registration)
    Top-level MCP server dispatch logic that identifies AWS tools and routes calls to handleAWSTool.
    if (awsTools.some((t) => t.name === name)) {
      result = await handleAWSTool(name, args || {});
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. It doesn't disclose behavioral traits like whether it's read-only (implied by 'List' but not explicit), rate limits, authentication needs, pagination behavior, or what happens if no functions exist. This leaves significant gaps for an agent to understand how to use it effectively.

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, direct sentence with no wasted words. It's front-loaded and efficiently conveys the core purpose without unnecessary elaboration, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the complexity of AWS operations and the lack of annotations and output schema, the description is incomplete. It doesn't cover key aspects like return format, error handling, or how results are structured (e.g., list of function names vs. details). For a tool that interacts with a cloud service, more context is needed to ensure reliable agent usage.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'region' parameter fully documented. The description doesn't add any meaning beyond the schema, such as explaining region selection impact or default behavior. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 verb ('List') and resource ('Lambda functions in AWS'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'aws_list_ec2_instances' or 'aws_list_s3_buckets' beyond the resource type, nor does it mention scope limitations like region filtering or pagination.

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. It doesn't mention sibling tools like 'list_resources' (which might be more generic) or 'aws_list_ec2_instances' (for other AWS resources), nor does it specify prerequisites such as AWS credentials or permissions required.

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/code-alchemist01/Cloud-mcp_server'

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