Skip to main content
Glama

Text classify

text_classify
Read-onlyIdempotent

Classify text into 12 built-in topics (crypto_defi, ai_agents, software_dev, security_privacy, finance_markets, ecommerce_retail, legal_compliance, support_ticket, marketing_sales, news_world, science_research, general) or custom labels (mode=fast|ai). $0.001 per call over x402 or X-API-Key. Call once without payment for terms, then call again with payment.

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": {
      "text": "<text>"
    },
    "name": "text_classify"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNofast (deterministic, default) or ai (Workers AI).
textYesText to classify.
labelsNoOptional comma-separated custom labels (2 to 20).
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds non-obvious behavior: per-call pricing ($0.001), dual auth paths (x402 or X-API-Key), and the mandatory two-phase invocation for payment. It does not describe the response shape (label only? label plus confidence?), which matters since there is no output schema.

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, each carrying distinct information: capability and label set, cost and auth, then the call sequence. The critical payment prerequisite is placed last but framed as an imperative, so nothing is buried.

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 four-parameter tool with full schema coverage and no output schema, the description covers purpose, pricing, auth, and invocation order well. The one remaining gap is return-value shape: with no output schema, an agent cannot tell whether the response is a bare label, a scored set of labels, or both.

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 baseline is 3. The description goes beyond it by explaining the sequencing semantics of the `payment` parameter — that its absence returns terms rather than a classification — which the schema does not convey. It adds little for `mode` and `labels`, which the schema already documents.

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) and resource (text), enumerates all 12 built-in topic labels verbatim, and explicitly contrasts that with the custom-label path. An agent knows exactly what the tool produces without opening the schema.

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 two-step payment protocol ('call once without payment for terms, then call again with payment') and the meaning of mode=fast vs ai are spelled out, which is genuine when/how guidance. However, there is no guidance on when to pick this over sibling classifiers like text_sentiment or text_keywords, and no stated exclusions or failure conditions.

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