Skip to main content
Glama

Preview rows from a table

sample
Read-onlyIdempotent

Quick data preview from a table without writing SQL. Raw exploration tools do not apply probe redaction and are not bound by schema exposure: they reach any object the datasource credential reaches, and are offered to Administrators, and to members whose Role grants Full; separate access checks apply. Schema exposure governs get_schema, the ontology and approved requests. Rows are positional arrays in columns order. Pass format: "records" for one object per row in returned-column order. Duplicate exact column names collapse to one column at the first position; the surviving value is unspecified. Use unique SQL aliases to preserve every selected value.

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": "sample"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of rows to return (default: 10, max: 100)
tableYesTable name (format: schema.table or just table)
formatNoRow format (default: compact)
datasourceNoOptional datasource ID to target. Omit to use the project's configured default; required when the project has multiple datasources and no default is configured. Each datasource has its own SQL dialect: get_schema lists every datasource with its type, dialect and identifier quote, and every result carries datasource_type and dialect. A datasource that has not finished setup is refused with datasource_not_ready. Use datasource (not datasource_id) here; Request authoring uses datasource_id. Unknown top-level arguments and malformed supplied datasource values return invalid_parameters before datasource selection. Supply a nonzero UUID string, or omit datasource intentionally to use the default/sole datasource.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, non-destructive, closed-world), the description discloses that this path bypasses probe redaction and schema exposure and reaches anything the datasource credential reaches, plus a real quirk: duplicate column names collapse to one column with an unspecified surviving value. The access-model sentence is dense and slightly ambiguous in its phrasing, which keeps it from a 5.

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

Conciseness3/5

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

The purpose is front-loaded in one clean sentence, and the result-format guidance earns its place. However, the access-model sentence is a long run-on that blends redaction, credential reach, role grants and schema exposure into one ambiguous clause, which costs readability.

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

Completeness4/5

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

With no output schema, the description does the work of explaining result shape (positional arrays, columns order, records mode), which is essential for this tool. The default 'compact' payload structure and pagination/row-limit behavior are only partially covered, but nothing critical is missing for a correct call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes further by explaining that rows are positional arrays in `columns` order and that `format: "records"` returns one object per row in returned-column order — meaning the enum values' consequences are spelled out rather than left to the schema. It also warns to use unique SQL aliases to avoid the duplicate-column collapse.

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 opening sentence gives a specific verb and resource – preview rows from a table without writing SQL — which is far clearer than the bare name 'sample'. It also distinguishes itself from schema-governed tools (get_schema, the ontology, approved requests), though it never states a positive when-to-prefer-this condition beyond 'raw exploration'.

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

Usage Guidelines4/5

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

It establishes the access context in which the tool applies (Administrators and members whose Role grants Full, with separate access checks) and contrasts that with schema-exposure-governed tools. What is missing is an explicit 'use this instead of X when Y' statement or a note on when to prefer the governed alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources