Skip to main content
Glama

count_rows

Count rows in a Turso table, using an optional WHERE condition to filter records. Get the exact number of matching entries for reporting, validation, or debugging.

Instructions

Conta o número de registros em uma tabela

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesNome da tabela
whereNoCondição WHERE opcional (ex: 'status = active')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It honestly states the read-only counting operation, but fails to disclose the return format (e.g., a single integer), the effect of the optional where parameter, error behavior for nonexistent tables, or potential performance implications of counting all rows in a large table.

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?

A single, front-loaded sentence with zero waste. The core operation is stated immediately and there is no filler or redundant phrasing. For a tool of this simplicity, the length is appropriate.

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

Completeness3/5

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

The tool is relatively simple — two parameters, both documented in the schema, and no output schema. However, the description omits any mention of the WHERE filter, which materially changes the result, and does not clarify whether the return value is a bare integer or a single-row result set. Adequate but with clear gaps.

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 the baseline is 3 even though the description adds no parameter-level detail. The description mentions 'tabela' (table), which aligns with the table parameter, but it silently ignores the where parameter that the schema documents with an example. It neither adds nor contradicts schema information.

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 description states a clear operation ('Conta o número de registros') and a specific resource ('em uma tabela'), making it obvious this tool returns a row count. It does not explicitly differentiate from siblings like execute_select, but the counting semantics are distinct enough that a capable agent can tell what it does.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as execute_select or describe_table, and no mention of the optional WHERE condition or when it should be used. The usage context is only implied by the verb 'count' — an agent gets no help deciding between this and a generic query tool.

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