describe_table
Retrieve detailed information about a specific DynamoDB table, including its configuration, indexes, and capacity settings. Supports effective management and monitoring of DynamoDB resources.
Instructions
Gets detailed information about a DynamoDB table
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tableName | Yes | Name of the table to describe |
Input Schema (JSON Schema)
{
"properties": {
"tableName": {
"description": "Name of the table to describe",
"type": "string"
}
},
"required": [
"tableName"
],
"type": "object"
}
Implementation Reference
- src/index.ts:563-582 (handler)The main handler function for the 'describe_table' tool. It takes tableName from params, sends a DescribeTableCommand to the DynamoDB client, and returns the table description or error.async function describeTable(params: any) { try { const command = new DescribeTableCommand({ TableName: params.tableName, }); const response = await dynamoClient.send(command); return { success: true, message: `Table ${params.tableName} described successfully`, table: response.Table, }; } catch (error) { console.error("Error describing table:", error); return { success: false, message: `Failed to describe table: ${error}`, }; } }
- src/index.ts:221-231 (schema)Tool definition including name, description, and input schema requiring 'tableName'.const DESCRIBE_TABLE_TOOL: Tool = { name: "describe_table", description: "Gets detailed information about a DynamoDB table", inputSchema: { type: "object", properties: { tableName: { type: "string", description: "Name of the table to describe" }, }, required: ["tableName"], }, };
- src/index.ts:598-600 (registration)Registration of the DESCRIBE_TABLE_TOOL in the list of available tools returned by ListToolsRequestHandler.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [CREATE_TABLE_TOOL, UPDATE_CAPACITY_TOOL, PUT_ITEM_TOOL, GET_ITEM_TOOL, QUERY_TABLE_TOOL, SCAN_TABLE_TOOL, DESCRIBE_TABLE_TOOL, LIST_TABLES_TOOL, CREATE_GSI_TOOL, UPDATE_GSI_TOOL, CREATE_LSI_TOOL, UPDATE_ITEM_TOOL], }));
- src/index.ts:641-643 (registration)Dispatch case in the CallToolRequestHandler switch statement that invokes the describeTable handler for the 'describe_table' tool.case "describe_table": result = await describeTable(args); break;