Skip to main content
Glama
imankamyabi

DynamoDB MCP Server

by imankamyabi

update_capacity

Modify the read and write capacity units of a DynamoDB table to manage performance and scalability using the DynamoDB MCP Server.

Instructions

Updates the provisioned capacity of a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
readCapacityYesNew read capacity units
tableNameYesName of the table
writeCapacityYesNew write capacity units

Implementation Reference

  • The main handler function for the 'update_capacity' tool. It uses UpdateTableCommand to update the provisioned throughput (read/write capacity) of a DynamoDB table.
    async function updateCapacity(params: any) {
      try {
        const command = new UpdateTableCommand({
          TableName: params.tableName,
          ProvisionedThroughput: {
            ReadCapacityUnits: params.readCapacity,
            WriteCapacityUnits: params.writeCapacity,
          },
        });
        
        const response = await dynamoClient.send(command);
        return {
          success: true,
          message: `Capacity updated successfully for table ${params.tableName}`,
          details: response.TableDescription,
        };
      } catch (error) {
        console.error("Error updating capacity:", error);
        return {
          success: false,
          message: `Failed to update capacity: ${error}`,
        };
      }
    }
  • The Tool object definition for 'update_capacity', including name, description, and inputSchema for validation.
    const UPDATE_CAPACITY_TOOL: Tool = {
      name: "update_capacity",
      description: "Updates the provisioned capacity of a table",
      inputSchema: {
        type: "object",
        properties: {
          tableName: { type: "string", description: "Name of the table" },
          readCapacity: { type: "number", description: "New read capacity units" },
          writeCapacity: { type: "number", description: "New write capacity units" },
        },
        required: ["tableName", "readCapacity", "writeCapacity"],
      },
    };
  • src/index.ts:598-600 (registration)
    Registers the UPDATE_CAPACITY_TOOL in the list 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:626-628 (registration)
    Dispatches tool calls to the updateCapacity handler in the CallToolRequestHandler switch statement.
    case "update_capacity":
      result = await updateCapacity(args);
      break;
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 'Updates' implies a mutation, but doesn't disclose critical traits like required permissions, whether changes are reversible, potential costs or rate limits, or what happens if invalid capacity values are provided. This is a significant gap for a mutation tool with zero annotation coverage.

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 with zero waste, front-loaded with the core action. It's appropriately sized for the tool's complexity, making it easy to parse quickly without unnecessary elaboration.

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 tool's complexity as a mutation operation with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects (e.g., side effects, error handling) and doesn't explain what the tool returns, leaving the agent with insufficient context for reliable use.

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 description adds no meaning beyond what the input schema provides, as schema description coverage is 100% with clear parameter descriptions. The baseline score of 3 is appropriate because the schema does the heavy lifting, but the description doesn't compensate with additional context like units of capacity or constraints on values.

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 ('Updates') and resource ('provisioned capacity of a table'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'update_gsi' or 'update_item', which might also involve updates to table-related resources, leaving some ambiguity about scope.

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 prerequisites (e.g., the table must exist), exclusions (e.g., cannot be used with certain table types), or related tools like 'create_table' or 'describe_table' for context, leaving the agent to infer usage from the name alone.

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

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