Skip to main content
Glama

Classify text and sentiment

classify_text
Read-only

Sort text into custom labels for ticket routing, intent, topic, spam, or lead quality; omit labels to detect sentiment with a confidence score and one-line reason.

Instructions

Sort text into your own labels (support ticket routing, intent, topic, spam, lead quality) or, with no labels, get its sentiment (positive, negative, neutral). Returns the best label, a confidence and a one-line reason. Costs $0.002 per call.

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": "classify_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to classify.
multiNoAllow more than one label. Default false.
labelsNoYour labels, e.g. ["billing", "bug", "feature request", "other"]. Default: sentiment.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds genuinely useful context beyond them: the per-call price ($0.002), the default behavior when labels are omitted, and the shape of the result (best label, confidence, one-line reason). Since no output schema exists, disclosing the return shape is especially valuable. It stops short of 5 because it says nothing about latency, rate limits, or how ties are broken when multi is true.

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?

Two tightly written sentences: mode selection and output shape first, cost last. No filler, and every clause carries information an agent needs to decide or call correctly.

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?

For a three-parameter, read-only utility with no output schema, the description covers purpose, mode selection, default behavior, result shape, and cost. Nothing essential for a correct invocation is missing.

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 the baseline is 3, but the description adds meaning beyond the schema by explaining the interplay between labels and the sentiment fallback and by illustrating realistic label sets. The multi parameter's effect on the return value ('best label' singular vs. multiple) is only implied rather than stated.

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 ('Sort text into your own labels') and explicitly covers the two operating modes: custom-label classification and, when no labels are supplied, sentiment. The parenthetical use cases (support ticket routing, intent, topic, spam, lead quality) make the scope concrete enough to distinguish it from sibling-named tools like sentiment or embed_text.

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 a clear conditional rule: supply labels for custom classification, omit them to get sentiment. That is actionable when-to-use guidance, though it does not explicitly name the dedicated sentiment tool as an alternative, leaving mild ambiguity about which to prefer for pure sentiment tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.