Skip to main content
Glama
DynamoDB MCP Server

DynamoDB MCP Server

query

Retrieves items from a DynamoDB table or index by partition key value, with optional sort key filtering and pagination controls.

Instructions

Returns items from a table or index matching a partition key value, with optional sort key filtering.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table_name": "<table_name>",
      "key_condition_expression": "<key_condition_expression>"
    },
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoThe maximum number of items to evaluate
selectNoThe attributes to be returned. Valid values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT
index_nameNoThe name of a GSI
table_nameYesTable Name or Amazon Resource Name (ARN)
region_nameNoThe aws region to run the tool
filter_expressionNoFilter conditions expression that DynamoDB applies to filter out data
scan_index_forwardNoAscending (true) or descending (false).
exclusive_start_keyNoUse the LastEvaluatedKey from the previous call. Must use DynamoDB attribute value format (see IMPORTANT note about DynamoDB Attribute Value Format).
projection_expressionNoAttributes to retrieve, can include scalars, sets, or elements of a JSON document.
key_condition_expressionYesKey condition expression. Must perform an equality test on partition key value.
expression_attribute_namesNoSubstitution tokens for attribute names in an expression.
expression_attribute_valuesNoValues that can be substituted in an expression. Must use DynamoDB attribute value format (see IMPORTANT note about DynamoDB Attribute Value Format).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.8

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden. It implies a read operation but omits key behavioral facts an agent needs: that results are paginated via LastEvaluatedKey, that filter expressions are applied after the key read and therefore don't reduce consumed capacity, and whether reads are eventually or strongly consistent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single well-formed sentence with the scope constraint front-loaded and no filler. It is efficient, though for a 12-parameter tool with nested objects the brevity edges toward under-specification rather than pure economy.

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?

With 12 parameters, nested attribute-value objects, no annotations, and no output schema, the description should clarify expression semantics and pagination behavior. It does neither, leaving an agent to infer how filter_expression differs from key_condition_expression and how to continue a result set.

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?

Schema description coverage is 100%, so the schema already documents all 12 parameters including expression attributes, projection, and pagination tokens. The description adds only the conceptual frame that key_condition_expression must contain a partition key equality and may add sort key filtering, which is useful but marginal beyond the schema.

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?

States a specific verb and resource: 'Returns items from a table or index matching a partition key value,' and adds 'optional sort key filtering.' The partition-key-equality constraint implicitly separates it from a full-table read like scan, but the sibling is never named, so differentiation is inferred rather than explicit.

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?

There is no statement of when to use this tool versus alternatives (scan, get_item, or query against a GSI), nor any prerequisites or exclusions. The only guidance is the embedded hint that a partition key value must be supplied, which is a parameter constraint rather than usage routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.