aws_list_rds_instances
List all AWS RDS database instances in a specified region to manage cloud resources and monitor database deployments.
Instructions
List all RDS database instances in AWS
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | AWS region | us-east-1 |
Implementation Reference
- src/adapters/aws-adapter.ts:211-241 (handler)Core handler implementing AWS RDS instance listing using RDSClient and DescribeDBInstancesCommand, mapping results to RDSInstance format.async listRDSInstances(): Promise<RDSInstance[]> { await this.initializeClients(); if (!this.rdsClient) throw new Error('RDS client not initialized'); try { const command = new DescribeDBInstancesCommand({}); const response = await this.rdsClient.send(command); const instances: RDSInstance[] = []; for (const dbInstance of response.DBInstances || []) { instances.push({ id: dbInstance.DBInstanceIdentifier || '', type: 'database', name: dbInstance.DBInstanceIdentifier || '', region: this.region, status: this.mapDBInstanceState(dbInstance.DBInstanceStatus), dbInstanceIdentifier: dbInstance.DBInstanceIdentifier || '', engine: dbInstance.Engine || '', engineVersion: dbInstance.EngineVersion || '', instanceClass: dbInstance.DBInstanceClass || '', allocatedStorage: dbInstance.AllocatedStorage, multiAZ: dbInstance.MultiAZ, }); } return instances; } catch (error) { throw new Error(`Failed to list RDS instances: ${error instanceof Error ? error.message : String(error)}`); } }
- src/tools/aws-tools.ts:149-163 (handler)Tool handler case within handleAWSTool that calls AWSAdapter.listRDSInstances() and formats output for the tool response.case 'aws_list_rds_instances': { const instances = await adapter.listRDSInstances(); return { total: instances.length, instances: instances.map((inst) => ({ id: inst.id, name: inst.dbInstanceIdentifier, engine: inst.engine, engineVersion: inst.engineVersion, instanceClass: inst.instanceClass, status: inst.status, region: inst.region, })), }; }
- src/tools/aws-tools.ts:47-60 (schema)Tool schema definition including name, description, and inputSchema with optional region parameter.{ name: 'aws_list_rds_instances', description: 'List all RDS database instances in AWS', inputSchema: { type: 'object', properties: { region: { type: 'string', description: 'AWS region', default: 'us-east-1', }, }, }, },
- src/server.ts:19-27 (registration)MCP tool registration: includes awsTools (containing aws_list_rds_instances) in the allTools array returned by listTools handler.const allTools = [ ...awsTools, ...azureTools, ...gcpTools, ...resourceManagementTools, ...costAnalysisTools, ...monitoringTools, ...securityTools, ];
- src/server.ts:64-65 (registration)MCP server routes calls to aws_list_rds_instances by checking against awsTools and invoking handleAWSTool.if (awsTools.some((t) => t.name === name)) { result = await handleAWSTool(name, args || {});