Skip to main content
Glama

Score the sentiment of text as positive or negative

sentiment
Read-only

Sentiment of one text, or up to 20 (texts, a JSON array), each up to 2,000 characters: POSITIVE or NEGATIVE with the model's confidence, from DistilBERT SST-2. Best for short English text. It measures the wording, not whether the statement is true. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sentiment"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoOne text, up to 2,000 characters
textsNoJSON array of up to 20 texts

Output Schema

NameRequiredDescriptionDefault
countNo
modelNo
labelsNo
resultsNo
checkedAtNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses the batch ceiling (20 texts), per-item length limit (2,000 characters), and the scoring model. It also carries the cost model an agent must know before calling: $0.002 per successful call, x402 payment in USDC across Base, Solana and other networks, with failed calls not charged.

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?

Purpose, limits, caveat and pricing are front-loaded in a single dense sentence with no filler. The sentence is long and clause-heavy, but every clause (model, batch cap, character cap, truth caveat, billing) carries information an agent needs.

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?

An output schema exists, yet the description still states the return labels and confidence, and it fully covers the unusual cost dimension. Limits, scope and payment mechanics are all present, so nothing an agent needs to invoke this correctly 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 real meaning: it frames the two parameters as alternatives ('one text, or up to 20') and attaches the 2,000-character cap to each array element, which the schema's 'texts' description omits. It stops short of stating whether passing both fields is an error.

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?

Names a specific operation and resource ('Sentiment of one text, or up to 20'), the output shape ('POSITIVE or NEGATIVE with the model's confidence') and the underlying model (DistilBERT SST-2). It is precise enough to separate from a general tone tool, though it never names a sibling such as text_tone to route the agent explicitly.

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?

'Best for short English text' gives clear applicability scope, and 'It measures the wording, not whether the statement is true' tells the agent what question this tool does not answer. No explicit alternatives or when-not-to-use routing is provided, 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