Skip to main content
Glama
thhart

database-mcp

by thhart

count

Get row counts for a table with a quick planner estimate, optionally applying a WHERE filter, or execute an exact count when precise numbers are required.

Instructions

Row count, estimate-first: instant planner estimate (no scan), optionally with a WHERE clause; exact=true runs a real count(*) under the statement timeout. Prefer the estimate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exactNo
tableYes
whereNo
profileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden of behavior disclosure. It plainly states the estimate does a no-scan planner estimate, exact runs a real count with a statement timeout, and optionally applies a WHERE clause. This is transparent and informative, though it doesn't mention read-only nature or side effects (likely none).

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?

Two sentences, front-loaded with the core purpose and immediately followed by the key distinction and recommendation. Every word earns its place; no fluff or repetition.

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?

For a simple count tool with an output schema, the description covers the essential behavior: estimate vs exact, WHERE clause, and timeout. The only notable gap is the unexplained 'profile' parameter, which may be needed for correct invocation. Overall, an agent can likely proceed without further clarification.

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 0% for all parameters, so description must compensate. It explains 'exact' and 'where' (mentioning the WHERE clause) but does not clarify 'profile' or 'table' beyond the schema names. The description adds meaning for two of four parameters, leaving the rest undocumented. This is better than nothing but incomplete.

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 clearly states the tool performs a 'Row count' and distinguishes between estimate and exact modes. It names the verb and resource, though it doesn't explicitly contrast with sibling tools like sample or query. This is above average but lacks the explicit differentiation of the top tier.

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

Usage Guidelines3/5

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

It explicitly recommends 'Prefer the estimate' and explains when exact mode is appropriate (real count under timeout). However, it does not guide when to choose this tool over siblings like query or sample, or mention any context where counting might not be suitable. The guidance is limited to within-tool options, not tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thhart/database-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server