Skip to main content
Glama

x402-count-by

Count By: Count occurrences of each distinct value in an array. Provide values; returns a frequency map of value to count. 🆓 5 free trial calls per signed wallet

Input Schema

NameRequiredDescriptionDefault
valuesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / values / description
      Removed value: -"Values to process"
  2. Changed1 schema field changed
    • addedInput schema / properties / values
      Added value: +{
      +  "description": "Values to process",
      +  "type": "string"
      +}
  3. First observed

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden, and it does disclose two useful traits: the return shape (a frequency map keyed by value) and the payment/auth requirement of a signed wallet with 5 free trial calls. It stops short of behavior an agent needs, such as case sensitivity, how non-string inputs or duplicate whitespace are handled, and whether counts include null/empty values.

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?

Three short sentences, front-loaded with the operation and immediately followed by the input/output contract and the pricing note. No filler or repetition; it could only be improved by spending a few of those words on input format instead of nothing.

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?

Scored against this tool's low complexity (one parameter, no nesting, no output schema, no annotations): the description covers what it does, what it returns, and the payment model. The remaining hole — input encoding — is already penalized under parameter semantics rather than being double-counted here.

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

Parameters2/5

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

Schema coverage is 0% — 'values' is an undescribed string, and the description does nothing to clarify the encoding despite the tool conceptually taking an array. An agent cannot tell from either source whether values should be comma-separated, newline-delimited, JSON-encoded, or space-separated, which is the single most important detail for calling this tool correctly.

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 occurrences of each distinct value in an array') and names the output ('frequency map of value to count'), so the operation is unambiguous. It does not, however, differentiate itself from near-neighbors in the sibling list such as x402-frequency, x402-word-frequency, or x402-unique-count.

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

Usage Guidelines2/5

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

The only usage guidance is 'Provide values', which restates the parameter rather than explaining when to reach for this tool over the many counting/frequency siblings. No exclusions, preconditions, or alternative-routing are given; the sole added context is the billing note about 5 free trial calls.

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.

Resources