Skip to main content
Glama
jjikky

DynamoDB Read-Only MCP

by jjikky

describe-table

Retrieve comprehensive details about a DynamoDB table, including schema and configuration, by specifying its name using this tool on the DynamoDB Read-Only MCP server.

Instructions

Get detailed information about a DynamoDB table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to get details for

Implementation Reference

  • src/index.ts:47-76 (registration)
    MCP server.tool registration for 'describe-table', defining name, description, input schema, and thin async handler that calls describeTable and formats response.
    server.tool(
      'describe-table',
      'Get detailed information about a DynamoDB table',
      {
        tableName: z.string().describe('Name of the table to get details for'),
      },
      async ({ tableName }) => {
        try {
          const tableInfo = await describeTable(tableName);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(tableInfo, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            isError: true,
            content: [
              {
                type: 'text',
                text: `Error occurred: ${error.message}`,
              },
            ],
          };
        }
      }
    );
  • Core handler logic: creates DescribeTableCommand with tableName and sends it to DynamoDB client, returning the Table description or throwing error.
    export async function describeTable(tableName: string) {
      console.error('# Starting describeTable function:', tableName);
      try {
        const command = new DescribeTableCommand({
          TableName: tableName,
        });
        console.error('# DescribeTable command created successfully');
        const response = await dynamodb.send(command);
        console.error('# DescribeTable response received:', response);
        return response.Table;
      } catch (error) {
        console.error('# Error in describeTable function:', error);
        throw error;
      }
    }
  • Zod input schema defining 'tableName' as required string parameter.
    {
      tableName: z.string().describe('Name of the table to get details for'),
    },
  • Helper function to initialize and provide the DynamoDBDocumentClient instance used by describeTable.
    export const getDynamodb = (): DynamoDBDocumentClient => {
      if (!dynamoDbDocClient) {
        dynamoDbClient = new DynamoDBClient({
          region: process.env.AWS_REGION || 'ap-northeast-2',
          credentials: {
            accessKeyId: process.env.AWS_ACCESS_KEY_ID || '',
            secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || '',
            sessionToken: process.env.AWS_SESSION_TOKEN || undefined, // Optional, only if using temporary credentials
          },
        });
        dynamoDbDocClient = DynamoDBDocumentClient.from(dynamoDbClient);
      }
      return dynamoDbDocClient;
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get detailed information') but doesn't reveal critical traits like whether this is a read-only operation, potential rate limits, authentication requirements, error conditions, or what 'detailed information' includes (e.g., schema, throughput, status). This leaves significant gaps for safe and effective tool invocation.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple tool and front-loaded with the core action, making it easy 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 DynamoDB operations and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed information' entails (e.g., table properties, metrics), potential side effects, or error handling. For a tool interacting with a database system, more context is needed to ensure reliable use, especially with multiple sibling tools available.

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 single parameter 'tableName' clearly documented as 'Name of the table to get details for'. The description doesn't add any semantic context beyond this, such as format constraints or examples. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though no extra value is provided.

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 ('Get') and resource ('detailed information about a DynamoDB table'), making the purpose understandable. However, it doesn't differentiate from siblings like 'list-tables' (which lists table names) or 'get-item' (which retrieves specific items), leaving some ambiguity about what 'detailed information' specifically entails compared to other table-related tools.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like needing metadata vs. data retrieval, or how it differs from siblings such as 'list-tables' for table enumeration or 'get-item' for item-level details. Without such context, an agent might struggle to choose appropriately among the six sibling tools.

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

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/jjikky/dynamo-readonly-mcp'

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