Skip to main content
Glama

get_rows

Read-only

Retrieve filtered rows from tabular datasets using SQL-parameterized filters, column projection, and pagination to reduce tokens and isolate the data you need.

Instructions

Filtered row retrieval via structured filters. All filters are SQL-parameterized (no injection). Operators: eq, neq, gt, gte, lt, lte, contains, in, is_null, between. Use columns=[] to project — reduces tokens significantly on wide tables. Prefer aggregate() for summaries over paginating through rows. Rows come back as arrays under a 'fields' header (row_format='objects' for dicts). Returns at most limit rows (default 50); page with offset instead of raising it.

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": {
      "dataset": "<dataset>"
    },
    "name": "get_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows returned (default 50, hard cap 500)
offsetNoPagination offset (default 0)
redactNoScrub PII / credentials (emails, SSNs, Luhn-valid credit cards, JWTs, API keys, PEM blocks, AWS keys, GitHub/Slack tokens) from row cells before return (default true). Numeric cells are never altered. _meta.redaction reports cells_redacted + per-pattern counts.
columnsNoColumn projection — reduces tokens (default: all)
datasetYesDataset identifier
filtersNoFilter conditions (ANDed). E.g. [{"column": "AREA NAME", "op": "eq", "value": "Hollywood"}]
order_byNoColumn to sort by
order_dirNoSort direction (default 'asc')asc
row_formatNoarrays (default): 'fields' once, then one array per row. objects: one dict per row.arrays
redact_patternsNoAdditional Python regex patterns to layer on top of the built-in set. Invalid patterns are silently skipped (reported in _meta.redaction.invalid_custom_patterns).
redact_skip_columnsNoColumn names to exempt from redaction (e.g. an `email_hashed` column where the email pattern would false-positive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / row_format
      Added value: +{
      +  "default": "arrays",
      +  "description": "arrays (default): 'fields' once, then one array per row. objects: one dict per row.",
      +  "enum": [
      +    "arrays",
      +    "objects"
      +  ],
      +  "type": "string"
      +}
  2. First observedv1.31.1

TDQS

A4.3/5.0
Behavior4/5

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

The readOnlyHint annotation already establishes a safe read, and the description adds real behavioral context on top: filters are SQL-parameterized so no injection risk, there is a hard row cap with offset-based paging, and results ship as arrays under a 'fields' header. It does not discuss cost, latency, or what happens on a bad filter column, which keeps it short of 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.

Conciseness4/5

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

Sentences are dense and front-loaded: purpose first, then injection safety, operators, projection, alternative tool, output format, and paging. The operator list largely duplicates the schema enum, which is a small redundancy but also serves as a quick-scan reference.

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 11 parameters and no output schema, the description does the needed work by explaining the return shape ('fields' header plus row arrays, or objects) and the paging contract. Redaction details live in the schema, so it is reasonable that they are not repeated; only error behavior and result metadata are unaddressed.

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; the description earns extra by attaching intent to parameters rather than restating them — projection with columns=[] is framed as a token-reduction tactic, offset is framed as the preferred paging mechanism over a larger limit, and row_format is explained by its output shape.

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 opening sentence names a specific verb and resource ('Filtered row retrieval via structured filters') and the description explicitly routes summary use cases away to aggregate(), so an agent can distinguish it from both aggregate and the row-fetching siblings without opening either schema.

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 gives explicit alternatives and behaviors: 'Prefer aggregate() for summaries over paginating through rows' and 'page with offset instead of raising it' for large result sets. What is missing is guidance relative to other row-returning siblings such as sample_rows or search_data, so the agent still has to infer when this beats them.

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