count-items
Count items in a DynamoDB table
Read a DynamoDB account from an agent — table list, schema, key lookups, queries, scans and counts — with no tool in the set that can write.
LABSCO SUMMARY
The distinction that decides your bill is query-table against scan-table: a query is bounded by keyConditionExpression and can be pointed at a secondary index through indexName, while a scan reads the table and applies filterExpression afterwards. count-items answers a how-many question without moving the items across the wire. paginate-query-table takes a narrower argument list than query-table — no indexName, no limit, no filterExpression — so a paged read gives up the index target and the filter that the single-shot query accepts.
A read-only DynamoDB client exposing list-tables, describe-table, get-item, query-table, paginate-query-table, scan-table and count-items.
list-tables returns the table names in the account, and describe-table returns the detail of a single table by tableName.get-item, which takes the key and the tableName and returns that item.query-table, which takes a keyConditionExpression with expressionAttributeValues, can be aimed at a secondary index via indexName, and narrows the result with filterExpression, projectionExpression and limit.scan-table, under the same filterExpression, projectionExpression and limit controls.paginate-query-table for a query whose result set runs past a single response.count-items, which returns how many items match a filterExpression without returning the items themselves.AWS credentials for the account holding the tables — AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY — plus the region those tables live in as AWS_REGION.
One command plus a key — npx -y @smithery/cli install @jjikky/dynamo-readonly-mcp --client claude, then supply credentials
USE CASES
Find the table, read its schema to learn the key structure, then run a condition-bounded query against it.
Count what the filter matches first, then page the query only if the number justifies it.
Skip the query planning entirely and address the item directly.
Read the schema to confirm no index covers the attribute, then filter over a scan and keep the projection tight.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
count-itemsCount items in a DynamoDB table
describe-tableGet detailed information about a DynamoDB table
get-itemGet an item from a DynamoDB table based on a specific key
list-tablesGet a list of all DynamoDB tables
paginate-query-tablePaginate query results
query-tableQuery items from a DynamoDB table based on conditions
scan-tableScan items from a DynamoDB table
BEFORE YOU INSTALL
7 tools when we connected. Every tool reads, and no flag enables writes.
CONTEXT COST
Rated by the size of the 7 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @smithery/cli install @jjikky/dynamo-readonly-mcp --client claude{
"mcpServers": {
"dynamodb-readonly": {
"command": "npx",
"args": [
"-y",
"dynamo-readonly-mcp"
],
"env": {
"AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
"AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
"AWS_REGION": "<YOUR_AWS_REGION>"
}
}
}
}