Skip to main content
Glama

List records with pagination, or count them

record_query
Read-only

List records with pagination, or count them

Always keyset-paginated: when nextCursor comes back non-null there ARE more records — page with it instead of raising limit (capped at 100). Pass countOnly to get the total without fetching rows — it is a real, exact SQL count (never an estimate), so it is the right tool for a dashboard total instead of paging through everything and counting client-side. countOnly accepts viewId and/or filters to count a scoped subset (e.g. "PRs on the main branch"); both require baseId. To find records by a field value use record_find_by_field; to search content use search or grep.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoView sort (number/date fields only).
limitNoPage size, 1-100 (default 50).
baseIdNoRestrict to one Base. Omit for the space.
cursorNoOpaque cursor from the previous page.
viewIdNocountOnly only: count the rows this saved View displays. Requires baseId.
filtersNoView filters pushed down to the server. With countOnly, requires baseId; not every filter is a cheap SQL count (see the records.count API description) but the result is always exact.
playbookNoOptional. The playbook you are following, as `kind:nodeId[:key]` from playbooks_search (e.g. `prompt:nod_123:log-visit`). Recorded on the change request so the person can see which playbook produced it.
countOnlyNoReturn the total instead of rows.
targetSpaceIdNoBusabase space id. Call auth_verify first and ask the user which space to use when more than one is returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / playbook
      Added value: +{
      +  "description": "Optional. The playbook you are following, as `kind:nodeId[:key]` from playbooks_search (e.g. `prompt:nod_123:log-visit`). Recorded on the change request so the person can see which playbook produced it.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Even though annotations already declare readOnlyHint=true and destructiveHint=false, the description adds substantial behavioral detail: keyset pagination semantics, nextCursor meaning, limit cap, exact SQL count guarantee, and the caveat that not every filter is a cheap count. No contradiction with annotations.

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 dense but every sentence carries unique value: mode distinction, pagination rule, count semantics, scoped-count requirements, and sibling routing. The purpose is front-loaded and there is no filler.

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 9-param, 0-required, no-output-schema tool, the description covers the non-obvious behaviors an agent needs: keyset pagination, exact count semantics, baseId constraints for scoped counts, and how to route to alternatives. The rich schema covers parameter details and annotations cover safety, leaving no critical gap.

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 coverage is 100%, so the baseline is 3. The description reinforces cursor/limit interplay and countOnly scoping, but the parameter constraints (max 100, baseId requirements) are already present in the schema, so it doesn't add significant parameter-level meaning beyond usage guidance.

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 clear verb+resource pairing: 'List records with pagination, or count them.' It also distinguishes itself from nearby siblings by explicitly naming record_find_by_field for field-value lookup and search/grep for content search, so an agent can choose correctly without inspecting schemas.

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?

The description gives explicit when-to-use guidance: page with nextCursor instead of raising limit, use countOnly for exact dashboard totals, and route to record_find_by_field or search/grep for different lookup needs. It also specifies the baseId requirement for scoped counts, leaving little to inference.

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.