Skip to main content
Glama
imankamyabi

DynamoDB MCP Server

by imankamyabi

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

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to describe

Implementation Reference

  • 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}`,
        };
      }
    }
  • 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;
Install Server

Other Tools

Related 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/imankamyabi/dynamodb-mcp-server'

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