Skip to main content
Glama
shibbirweb

mcp-db-read-only

by shibbirweb

Get Table Sample

get_table_sample
Read-onlyIdempotent

Preview sample records from a table, collection, index, or Redis key to inspect data structure and content without modifying the database.

Instructions

Get sample rows from a table, documents from a collection, hits from an index, or the first entries of a Redis key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of rows to return (1-50, default 5)
tableYesTable, collection, index, or Redis key
databaseNoOptional database to read from for this call only, without changing the active connection

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already provide readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description has less burden. It adds useful scope context by covering four resource types and notes Redis returns 'first entries,' but it does not clarify whether table samples are random or deterministic or describe the return shape.

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, front-loaded sentence with no filler. It efficiently communicates the core action and all supported resource types in a scannable way.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only sampler with strong annotations and fully documented parameters, the basics are covered. However, with no output schema and no usage guidance, the description leaves the agent to infer return format and when sampling is preferable to search/find_documents.

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 three parameters. The description only restates the table parameter's permitted resource types and adds nothing meaningful about limit or database behavior beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Get sample rows') and enumerates the exact resource types it applies to: tables, collections, indexes, and Redis keys. The 'sample' qualifier distinguishes it from siblings like run_query, find_documents, and search, even without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'sample rows' implies a lightweight data-peeking use case, but there is no explicit statement of when to use this tool instead of alternatives like find_documents, search, or redis_command. Usage context is inferred rather than stated.

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