Skip to main content
Glama

telys_count

Read-onlyIdempotent

Count live rows in a collection, optionally filtered by a single-key equality condition. Retrieve post-tombstone cardinality to verify current data.

Instructions

Return the live row count (post-tombstone) for a collection — cardinality only, optionally where-scoped. Siblings: telys_stats for aggregate stats (partition key, live id count, runtime index counters); telys_ids to enumerate the ids themselves. Required: collection — the name of an existing collection in the active store; the call fails when it does not exist (write first via telys_add or telys_create_collection). Optional: where — a single-key equality filter (one key only); more than one key fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whereNooptional single-key equality filter, e.g. scope=project:acme (one key only)
collectionYesname of an existing collection in the active store

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / collection / description
      Added value: +"name of an existing collection in the active store"
    • changedInput schema / properties / where / description
      Previous value: -"optional single-key equality filter"New value: +"optional single-key equality filter, e.g. scope=project:acme (one key only)"
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond annotations: 'post-tombstone' semantics, 'cardinality only' (no stats), the failure on nonexistent collection, and the single-key equality filter constraint. It does not describe return format, but with no output schema and a simple cardinality result, the description is reasonably transparent.

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?

The description is compact and front-loaded: the core purpose is in the first sentence, followed by sibling differentiation, then parameter semantics and failure conditions. Every sentence earns its place; no filler or repetition of schema text.

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 read-only count tool with two parameters, full schema coverage, and strong annotations, the description is nearly complete. It covers purpose, scope, siblings, prerequisites, and failure modes. The only minor gap is the lack of an explicit return value description (e.g., integer count), but the phrase 'row count' and 'cardinality only' make the return obvious enough.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents both parameters. The description adds meaning by explaining the 'where' constraint in plain language ('single-key equality filter', 'more than one key fails') and by clarifying that 'collection' must be an existing collection in the active store. This goes slightly beyond the schema's own descriptions, so a 4 is appropriate.

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?

The description states a specific verb ('Return the live row count'), a precise resource ('a collection'), and a scope qualifier ('post-tombstone', 'cardinality only, optionally where-scoped'). It also explicitly distinguishes itself from siblings telys_stats and telys_ids, so an agent can tell it apart without opening schemas.

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

Usage Guidelines5/5

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

The description explicitly names sibling alternatives (telys_stats for aggregate stats, telys_ids for enumerating ids) and gives clear when-to-use guidance. It also states prerequisites ('write first via telys_add or telys_create_collection') and failure conditions ('fails when it does not exist', 'more than one key fails'), leaving little to inference.

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