Skip to main content
Glama

Count how many texts fall under each label

count_labels

Classify up to 1,000 texts and return only a histogram: how many landed on each label, and how many the model was unsure about. Use this when you want the shape of a corpus — what share of feedback is bugs vs praise, how many search results are relevant — without pulling a thousand individual answers into context. Use classify_texts when you need the answer per item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsYes1 to 1,000 texts to classify. Results come back in the same order.
labelsYes2 to 100 category names. Descriptive names classify better: "urgent bug" beats "p0". Add a label like "none of these" when none-of-the-above is a real outcome.
share_dataNoSynchronous classification request text, labels, instructions and model results are retained for model training and operator review in private Cloudflare storage by default. Shared requests receive double per-minute and daily classification quotas. Set share_data: false or X-Classifier-Share-Data: false to opt out and use standard limits. Share only data you have permission to contribute; do not include confidential or personal information. Redaction is best effort. Billing, spending caps and input-size limits still apply.
instructionsNoOptional extra criteria, e.g. "judge only the service, ignore the food".
unsure_belowNoAnswers with confidence under this count as unsure.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYes
countsYesLabel -> how many texts, every label present.
unsureYesHow many answers fell under unsure_below.
unsure_belowNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / share_data / default
      Previous value: -falseNew value: +true
    • changedInput schema / properties / share_data / description
      Previous value: -"Opt in to retaining this request's text, labels, instructions and model results for model training and operator review in private Cloudflare storage. Doubles per-minute and daily classification quotas. Off by default. Share only data you have permission to contribute; do not include confidential or personal information. Redaction is best effort. Billing, spending caps and input-size limits still apply."New value: +"Synchronous classification request text, labels, instructions and model results are retained for model training and operator review in private Cloudflare storage by default. Shared requests receive double per-minute and daily classification quotas. Set share_data: false or X-Classifier-Share-Data: false to opt out and use standard limits. Share only data you have permission to contribute; do not include confidential or personal information. Redaction is best effort. Billing, spending caps and input-size limits still apply."
  2. Changed1 schema field changed
    • addedInput schema / properties / share_data
      Added value: +{
      +  "default": false,
      +  "description": "Opt in to retaining this request's text, labels, instructions and model results for model training and operator review in private Cloudflare storage. Doubles per-minute and daily classification quotas. Off by default. Share only data you have permission to contribute; do not include confidential or personal information. Redaction is best effort. Billing, spending caps and input-size limits still apply.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare this is a mutating, open-world, non-idempotent call, so the safety profile is already covered. The description adds genuinely useful behavior beyond that: a 1,000-item cap, histogram-only output (no per-item answers land in context), and an 'unsure' bucket. It does not discuss data retention or quota behavior, but that is disclosed in the share_data schema parameter.

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 sentences, front-loaded with the core capability, then the use case, then the routing alternative. No filler, no repetition of the title, and each sentence carries new information.

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?

An output schema exists so return values needn't be explained. The description covers scope, limits, the aggregation-only nature of the result, and the alternative tool — everything an agent needs to call this correctly.

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 description coverage is 100%, so all five parameters — including instructions, share_data and unsure_below — are already documented in the schema. The description mentions the 1,000 cap and the unsure bucket but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb and resource ('Classify up to 1,000 texts and return only a histogram') plus the exact shape of the result. It explicitly sets itself apart from the sibling classify_texts, which returns per-item answers, so an agent can pick between them without opening either schema.

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?

Gives explicit when-to-use framing ('when you want the shape of a corpus — what share of feedback is bugs vs praise') and names the alternative with its selecting condition ('Use classify_texts when you need the answer per item'). Both the trigger and the exclusion are stated.

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.