Skip to main content
Glama

Count items in a list

castle_count_list_items
Read-only

Count the entries in one list, with the same optional filters as the search. Read-only despite being a POST. Castle: POST /v1/lists/{list_id}/items/count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoOptional {field, op, value} filters over the items.
list_idYesThe list to count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds genuinely useful context beyond them: it warns that the operation is read-only despite being a POST, which resolves an apparent HTTP-verb/semantics mismatch an agent would otherwise misread as a mutation. No rate limits or return-shape details are given, but the annotations carry the safety profile.

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?

Three short sentences, front-loaded with the purpose and filter behavior, followed by the read-only caveat and the endpoint. Nothing is padded and no sentence is wasted.

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 two-parameter count tool with no output schema and full schema coverage, the description plus annotations give an agent everything needed to call it correctly. The only minor omission is that it never states the return value is a scalar count, though that is largely self-evident from the name.

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 coverage is 100%, so the baseline is 3, but the description adds meaning by telling the agent that filters follow the same semantics as the search tool's filters, which the schema's generic '{field, op, value}' wording does not convey. It does not elaborate on filter fields or operators itself.

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 and resource: count the entries in one list. The word 'Count' clearly separates it from sibling castle_search_list_items, which returns the items themselves, and from castle_get_list, which returns list metadata. It does not name a sibling explicitly, so it stops short of a 5.

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 phrase 'with the same optional filters as the search' implies this is a lightweight count-only alternative to castle_search_list_items, which is a usable routing hint. However, there is no explicit when-to-use vs when-to-call-search statement and no exclusions or prerequisites.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.