Skip to main content
Glama

dynamodb_item_query

Query items from a DynamoDB table using key conditions and expression values to retrieve specific data entries.

Instructions

Query items in a DynamoDB table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYesName of the DynamoDB table
key_conditionYesKey condition expression
expression_valuesYesExpression attribute values

Implementation Reference

  • The core handler logic within handle_dynamodb_operations that executes the DynamoDB query operation using the boto3 client based on the provided table name, key condition, and expression values.
    elif name == "dynamodb_item_query":
        response = dynamodb_client.query(
            TableName=arguments["table_name"],
            KeyConditionExpression=arguments["key_condition"],
            ExpressionAttributeValues=arguments["expression_values"]
        )
  • Defines the Tool metadata including input schema for validating parameters: table_name, key_condition, and expression_values.
    Tool(
        name="dynamodb_item_query",
        description="Query items in a DynamoDB table",
        inputSchema={
            "type": "object",
            "properties": {
                "table_name": {
                    "type": "string",
                    "description": "Name of the DynamoDB table"
                },
                "key_condition": {
                    "type": "string",
                    "description": "Key condition expression"
                },
                "expression_values": {
                    "type": "object",
                    "description": "Expression attribute values"
                }
            },
            "required": ["table_name", "key_condition", "expression_values"]
        }
    ),
  • Registers all AWS tools, including dynamodb_item_query, by returning the list from get_aws_tools() in response to MCP list_tools requests.
    async def list_tools() -> list[Tool]:
        """List available AWS tools"""
        logger.debug("Handling list_tools request")
        return get_aws_tools()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a query operation, implying it's read-only and non-destructive, but doesn't cover important aspects like performance implications (e.g., query vs. scan efficiency), pagination handling, error conditions, or authentication requirements. For a database query tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 extremely concise—a single, direct sentence: 'Query items in a DynamoDB table.' It's front-loaded with the core action and resource, with zero wasted words. This makes it easy to parse quickly, though it sacrifices detail for brevity.

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 queries, the lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., items, metadata, pagination tokens), error handling, or how it differs from similar tools like 'scan'. For a tool with three required parameters and no structured behavioral hints, more context is needed to use it effectively.

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 clear documentation for each parameter (table_name, key_condition, expression_values). The description adds no additional semantic context beyond what's in the schema—it doesn't explain what a 'key condition expression' entails, how to format it, or provide examples. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but the description doesn't enhance parameter understanding.

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 'Query items in a DynamoDB table' clearly states the action (query) and resource (items in a DynamoDB table), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'dynamodb_item_scan' or 'dynamodb_item_get', which are also read operations on DynamoDB items, leaving some ambiguity about when to choose this specific query method.

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 that 'dynamodb_item_query' is for querying items based on primary key conditions, unlike 'dynamodb_item_scan' for full table scans or 'dynamodb_item_get' for retrieving a single item by exact key. There are no prerequisites, exclusions, or context provided for usage.

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

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/rishikavikondala/mcp-server-aws'

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