Skip to main content
Glama

Db Count

db_count

Count rows in a Drupal database table, optionally filtering with a WHERE condition, to verify data volume or check query results quickly.

Instructions

Count rows in a table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
whereNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/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. 'Count rows' implies a read-only operation, but the description says nothing about permissions, behavior on very large tables, or how the optional filter is applied. For a SQL-adjacent tool with zero annotation coverage this is a real gap.

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?

A single front-loaded sentence with no filler. It is efficient, though its brevity is part of the problem rather than a virtue given the undocumented parameters.

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

Completeness2/5

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

An output schema exists, so return values need not be explained. However, with no annotations, 0% parameter coverage, and an unexplained 'where' filter on a SQL-oriented tool, the description leaves significant gaps an agent must guess at before invoking it.

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

Parameters2/5

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

Schema description coverage is 0%, and the description explains neither parameter. The critical one is 'where' — the description never says whether it takes a raw SQL fragment, a structured clause, or a plain value, which materially changes how the agent should call it. The 'table' parameter is only vaguely implied.

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?

States a specific verb ('Count') and resource ('rows in a table'), which is enough for an agent to know it produces a scalar count rather than row data. It does not distinguish itself from the sibling db_query, which could also be used to count, nor does it name db_tables/db_table_info as alternatives.

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 versus db_query (which could COUNT(*) just as well) or db_table_info. No prerequisites, no mention of whether a prior db_tables lookup is needed to know valid table names.

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

Deploy Server

Other Tools