Skip to main content
Glama

Count Rows

count_rows
Read-onlyIdempotent

The live row count of a v2 app's collection (spec B4, issue #1056), a whole-scope total with no filter and no paging. Gated by the collection's countRead opt-in, independent of its read list: a collection that opted in returns its count even to a caller who cannot list the rows (the '3 spots left' shape), and a collection that never opted in refuses with collection_count_forbidden even for a caller who could otherwise list. Returns { count }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYesThe app id.
collectionYesThe collection name declared in the app's manifest.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds substantial non-obvious behavior: the countRead opt-in gate, its independence from the read list, the exact error code on refusal, and the returned shape. This is real context an agent cannot get from the annotations.

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?

Dense but front-loaded: the core scope statement comes first, followed by the gating semantics. The '(spec B4, issue #1056)' parentheticals are extraneous to selection/invocation and cost a little tightness.

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?

No output schema exists, but the description supplies the return shape ('Returns { count }') along with the gate and error semantics. For a read-only counter with two fully documented params, 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% and both parameters (app_id, collection) are documented in the schema. The description adds no syntax, format, or constraint details beyond what the schema already provides, so 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+resource ('live row count of a v2 app's collection') and immediately distinguishes it from list-style siblings by declaring it 'a whole-scope total with no filter and no paging'. An agent can tell it apart from list_rows/get_row 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 Guidelines4/5

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

Explains the operating context well: gated by the countRead opt-in and independent of the read list, with the exact refusal behavior (collection_count_forbidden) spelled out. It never explicitly names an alternative sibling (e.g., 'use list_rows when you need filtering'), so it stops just short of full when-to-use routing.

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.