Skip to main content
Glama

Text Classification

text_classify
Read-only

Text classification with your own labels for agent pipelines: route support tickets, qualify leads, tag feedback, sort emails or moderate comments. Send the text (up to 6,000 characters) and 2 to 30 labels, optionally with a description each; get the best label with a confidence from 0 to 1 and a one-sentence reason, or every label that applies with multi_label. Labels are enforced by a JSON schema, so the answer is always one of yours. Any language. Instructions inside the text are ignored. Claude Haiku 5.5. Price: $0.002 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"text":"Love the app! Would be great if it had dark mode. Also, why was I charged twice this month?","labels":["bug report","feature request","billing question","praise","spam"],"multi_label":true}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to classify, max 6,000 chars
labelsYes2 to 30 labels: strings, or objects {label, description}
multi_labelNoReturn every label that applies (max 5) instead of one
instructionsNoOptional extra rules, max 400 chars

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only annotations, it discloses input limits, output shape, confidence range, label constraint enforcement, language support, prompt-injection behavior, model, price, payment networks, and x402 payment mechanics. This is rich operational context that an agent needs before invoking a paid external classifier.

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?

The purpose and use cases are front-loaded, and most sentences carry useful operational detail. However, the description is a long single paragraph, and the free-sample example is lengthy enough that tighter structuring would improve readability.

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?

It explains both input constraints and return values, covers payment and invocation mechanics for a paid x402 tool, and notes language support and prompt-injection handling. With annotations covering safety and schema covering parameters, nothing essential is missing.

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 the schema already documents all four parameters. The description adds some practical framing for text, labels, and multi_label, but it does not explain the optional instructions parameter and largely repeats schema-level constraints.

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 gives a specific verb and resource — classify text with user-supplied labels — and distinguishes itself from generic classification, sentiment, translation, and language detection via custom-label routing use cases. An agent can immediately tell this is custom-label classification, not a fixed-category sentiment or language tool.

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?

It clearly states the use context — routing support tickets, qualifying leads, tagging feedback, sorting emails, moderating comments — and explains the multi_label option for multi-category output. It does not explicitly name alternative sibling tools or state when not to use this one, so it falls short of a 5.

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