Skip to main content
Glama

datamodel.get_row_count

datamodel_get_row_count
Read-only

Count rows per table in a data model, returning table names with row counts and a total. Use to assess data volumes or verify model completeness.

Instructions

Retrieve the row count for each table in a specific data model. Resolves the data model's tables, counts rows per table, and returns the results in a flat row-based structure suitable for tabular representation. Returns: list[dict[str, Any]] | dict[str, Any] List of dictionaries, each with "table_name" and "row_count", plus a final entry with the total row count. On failure, returns the standard ``{"ok": False, "error": "...", …

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datamodel_nameYesName of the data model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Annotations already mark this read-only and non-destructive. The description adds meaningful behavioral detail: it resolves tables, counts rows per table, returns a flat list of dictionaries with table_name and row_count plus a total entry, and specifies the failure return shape. This goes beyond the annotations and is especially valuable because no output schema exists.

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?

The description is mostly efficient and front-loaded, but the second sentence partly restates the first ('Resolves the data model's tables, counts rows per table') before adding the return shape. Still, the return details are necessary and well placed.

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 simple read-only tool with one parameter, no output schema, and annotations covering safety, the description provides sufficient context: it states the operation, return structure, final total row entry, and failure format. No critical information 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?

The only parameter, datamodel_name, has 100% schema description coverage ('Name of the data model.'). The description adds no new parameter-level detail, so the baseline of 3 applies.

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 uses a specific verb and resource: 'Retrieve the row count for each table in a specific data model.' It is clearly distinct from siblings like datamodel_get_data or datamodel_get_all_datamodel, but it does not explicitly differentiate itself from similar sibling tools, so it misses the top score.

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?

The intended use is implied: call this when you need per-table row counts for a named data model. However, there is no explicit when-not-to-use guidance or mention of alternatives such as datamodel_describe_datamodel or datamodel_get_table_schema for schema-level needs.

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