Skip to main content
Glama

Sentiment analysis API: positive or negative with a confidence score

ai_sentiment_analysis
Read-only

Sentiment analysis of text: positive or negative with a confidence score, from a DistilBERT model fine-tuned on SST-2, for English text. Use to classify reviews, support tickets, social posts, headlines and replies at scale, or as the scoring step of a monitoring agent. Example: text=The checkout was fast and support answered within minutes.. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesEnglish text, up to 4,000 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and idempotentHint=false; the description reinforces this with "Reads or computes only and changes nothing" and explains that repeats are not free because each call is charged. It also adds auth and cost detail absent from the annotations (x402 USDC or card key at /credits, $0.01/call, first 25 free, failed calls free), which is genuinely useful for planning. It leaves out rate limits, behaviour on non-English input, and error handling.

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 core capability and model are front-loaded, then usage contexts, then pricing/auth, so the important information comes first. It is dense but almost every clause carries signal; the inline example is slightly clumsy (double period, literal `text=` fragment) and could be dropped without loss.

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 single-parameter, non-mutating inference tool with a fully documented schema, the description covers purpose, model, language, return shape, cost and auth. Missing details are secondary: confidence-score range, handling of inputs near or over the 4,000-character limit, and error behaviour.

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?

Only one parameter exists and schema description coverage is 100% ("English text, up to 4,000 characters"), so the baseline is 3. The description echoes the English constraint and supplies a sample text value, but adds no format, length, or input-validation nuance beyond 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?

States a concrete verb and resource ("Sentiment analysis of text"), the exact output shape (positive or negative with a confidence score), the underlying model (DistilBERT fine-tuned on SST-2) and the language scope (English). It is far more specific than a restated title, but it never distinguishes itself from the sibling tool `ai_sentiment`, which appears to overlap entirely.

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 — reviews, support tickets, social posts, headlines, replies at scale, or as the scoring step of a monitoring agent — which tells an agent the intended context. It stops short of exclusions and does not tell the caller when to pick `ai_classify` or `ai_sentiment` instead.

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