Skip to main content
Glama

classify

Read-only

Classify (Cohere-compatible) — Drop-in Cohere v1 /classify endpoint: POST {inputs:[...up to 96 strings], examples:[{text,label},...up to 200]} and get each input's prediction, confidence and per-label confidences back in Cohere's exact response shape (classifications[].prediction/confidence/labels, meta.billed_units). Few-shot by embeddings (bge-base-en-v1.5 centroid + nearest-example cosine), no fine-tuning, no LLM call: fast and cheap for intent routing, ticket triage, spam/topic tagging. Needs at least 2 labels; 2+ examples per label recommended. Pairs with /v1/embed and /v1/rerank. Price: $0.004 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inputs": "<inputs>",
      "examples": "<examples>"
    },
    "name": "classify"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
examplesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this read-only, non-destructive and open-world, and the description adds substantial context beyond that: the underlying mechanism (bge-base-en-v1.5 centroid plus nearest-example cosine), the absence of any LLM call, input size ceilings, and the exact response shape including meta.billed_units. It even discloses the cost and payment rail ($0.004 USDC on Base via x402), which the annotations do not cover.

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?

A single dense paragraph, but front-loaded with the core contract and ordered from what it is, to limits, to mechanism, to use cases, to pricing. Some material (response-shape field names, price) is packed tightly, yet every sentence carries information an agent needs; nothing is filler.

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?

There is no output schema, and the description compensates by spelling out the return shape (classifications[].prediction/confidence/labels, meta.billed_units). Combined with constraints, mechanism, cost, and when it pairs with embed/rerank, an agent has everything needed to invoke it correctly with no fine-tuning assumptions.

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

Parameters5/5

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

Schema description coverage is 0% and the schema itself is malformed (both parameters typed as string while their descriptions hold example arrays), so the description must carry the load. It does: inputs are up to 96 strings, examples are {text,label} pairs up to 200, with at least 2 labels and preferably 2+ examples per label — enough to construct a valid call.

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 (classify) plus the exact resource/contract: a Cohere v1 /classify-compatible endpoint taking inputs and text/label examples. It also distinguishes itself from the siblings embed and rerank by naming them as complements rather than equivalents, so an agent can route correctly without opening another schema.

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

Usage Guidelines4/5

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

Gives concrete use cases (intent routing, ticket triage, spam/topic tagging) and prerequisites (at least 2 labels, 2+ examples per label recommended, max 96 inputs / 200 examples). It also says what it is not (no fine-tuning, no LLM call) which implicitly steers agents away from LLM-style tools, but it never explicitly states when to prefer a sibling like ai_classify over this one.

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