list_trusted_advisor_checks
Retrieve available AWS Trusted Advisor checks to identify cost optimization, security, and performance improvement opportunities in your cloud environment.
Instructions
Lists Trusted Advisor checks available.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_trusted_advisor_checks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2303-2317 (handler)Handler function that implements the list_trusted_advisor_checks tool by calling AWS Support API's DescribeTrustedAdvisorChecksCommand and formatting the response.
if (name === "list_trusted_advisor_checks") { try { const command = new DescribeTrustedAdvisorChecksCommand({ language: "en" }); const response = await supportClient.send(command); const checks = response.checks?.map(c => ({ id: c.id, name: c.name, category: c.category })) || []; return { content: [{ type: "text", text: JSON.stringify(checks, null, 2) }] }; } catch (error) { // Return clear error if Support API is not available (e.g. Basic Support plan) return { content: [{ type: "text", text: JSON.stringify({ error: "Trusted Advisor check failed. Ensure you have Business/Enterprise support or access.", details: (error as Error).message }) }] }; } } - src/index.ts:777-781 (registration)Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.
{ name: "list_trusted_advisor_checks", description: "Lists Trusted Advisor checks available.", inputSchema: { "type": "object", "properties": {} } } - src/index.ts:780-780 (schema)Input schema definition for the tool (empty object, no parameters required).
inputSchema: { "type": "object", "properties": {} } - src/index.ts:46-46 (helper)Import of AWS SDK SupportClient and DescribeTrustedAdvisorChecksCommand used by the tool.
import { SupportClient, DescribeTrustedAdvisorChecksCommand } from "@aws-sdk/client-support"; - src/index.ts:79-79 (helper)Initialization of the SupportClient instance used in the tool handler.
const supportClient = new SupportClient({ region: "us-east-1" }); // AWS Support API is global (us-east-1)