Skip to main content
Glama

APEX AI, LLM, Embeddings, OCR & Media

Text sentiment

text_sentiment
Read-onlyIdempotent

Classify text sentiment (fast sub-200ms DistilBERT SST-2 positive/negative, or 3-way positive/neutral/negative with mode="detailed") and optional custom zero-shot labels. $0.001 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). 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_sentiment"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoOptional: fast (default DistilBERT) or detailed (3-way positive/neutral/negative).
textYesText to classify (1 to 8000 characters).
labelsNoOptional 2-12 comma-separated custom labels for zero-shot classification.
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context on top: expected sub-200ms latency, the underlying model (DistilBERT SST-2), per-call cost ($0.001), accepted payment rails (x402 with USDC on Arc/Base/Solana or XNT on X1), and the required terms-then-pay sequence. That is exactly the kind of operational detail annotations cannot convey.

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?

Two dense sentences with the capability stated first, then pricing/payment mechanics — well front-loaded. The parenthetical chain of payment chains (USDC on Arc, Base or Solana, or XNT on X1) is slightly heavy, but every clause carries decision-relevant information for an agent.

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?

With no output schema, the description still communicates the return shape (positive/negative, or positive/neutral/negative, or custom labels). Combined with the payment flow and latency expectation, an agent has what it needs to call correctly; only exact response envelope details are absent.

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 goes beyond it by explaining the meaning of the otherwise opaque `payment` parameter — the first call returns terms, the second must carry the signed x402 payload. It also clarifies `labels` as zero-shot classification targets and ties `mode` to concrete output shapes, rather than just restating the schema.

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?

The description opens with a specific verb+resource ('Classify text sentiment') and immediately differentiates the two modes (binary DistilBERT SST-2 vs. 3-way with mode="detailed") plus the zero-shot label option. It never names a sibling like text_summarize or text_embeddings to disambiguate the boundary, which is the only thing keeping it from a 5.

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 gives genuinely actionable usage guidance: mode selection (fast vs. detailed) and the explicit two-step payment handshake — 'Call once without `payment` for terms, then call again with `payment`.' There are no explicit when-not conditions or named alternatives, 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.