Skip to main content
Glama
DataPilot MCP

DataPilot MCP

Get table sample

get_table_sample
Read-only

Preview a few rows from any named table or view to inspect columns, sample records, and row count when no per-table sampling tool is available.

Instructions

Preview a small number of rows from a named table or view, even when no per-table sample tool exists. Returns columns, rows, and the returned row count. Order is unspecified. Use profile_table for quality statistics or execute_readonly_query for a filtered, ordered, or aggregate result.

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": "<table>"
    },
    "name": "get_table_sample"
  }
}

Input Schema

NameRequiredDescriptionDefault
aliasNoAlias from list_connections. Omit only when exactly one database is open.
limitNoRequested sample rows, subject to the server's row cap.
tableYesTable or view name from list_tables, e.g. public.orders.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.0
    • addedInput schema / properties / alias / description
      Added value: +"Alias from list_connections. Omit only when exactly one database is open."
    • changedInput schema / properties / limit / description
      Previous value: -"Rows to return"New value: +"Requested sample rows, subject to the server's row cap."
    • addedInput schema / properties / table / description
      Added value: +"Table or view name from list_tables, e.g. public.orders."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only, non-destructive, closed-world, but the description adds traits not in them: the return shape (columns, rows, row count) and, critically, 'Order is unspecified', which warns the agent not to depend on row ordering. It also flags that the requested limit is subject to a server-side row cap.

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?

Three short sentences, front-loaded with the core action and payoff, then caveats, then alternatives. The clause 'even when no per-table sample tool exists' is slightly meta and could be trimmed, but nothing else is wasted.

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

Completeness5/5

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

For a three-parameter read tool with full schema coverage and an output schema, the description covers purpose, result shape, ordering caveat, cap behavior, and routing to alternatives. Nothing an agent needs to call it correctly is missing.

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 alias, limit, and table are already fully documented, including the 'omit only when one database is open' rule and the sample-vs-cap relationship for limit. The description adds only soft context ('small number of rows', tables and views alike), so the baseline 3 applies.

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?

States a specific verb and resource ('Preview a small number of rows from a named table or view') and explicitly separates itself from profile_table and execute_readonly_query. An agent can pick this tool over its siblings without opening any schema.

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

Usage Guidelines5/5

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

Names two alternatives with the exact conditions that select them: profile_table for quality statistics, execute_readonly_query for filtered, ordered, or aggregate results. It also implies the when-not case (you need no filtering, ordering, or aggregation).

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