Skip to main content
Glama

ai_sentiment

Sentiment of a text (review, post, email, support ticket): positive, negative, neutral or mixed, a score from -1 to 1, confidence, up to 3 emotions and per-aspect sentiment. Up to 5,000 characters, any language. Llama 4 Scout on Workers AI. Costs $0.003 USDC on Base via x402.

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

Input Schema

NameRequiredDescriptionDefault
textYesThe text, up to 5,000 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well by disclosing the model, cost ($0.003 USDC on Base via x402), input limit, language support, and output fields. It omits rate limits, error behavior, and data-handling details, which keeps it from a 5.

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?

The description is two dense sentences with the purpose and outputs front-loaded, followed by operational constraints and cost. Every clause adds useful information without repetition.

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 simple one-parameter inference tool with no output schema, the description explains the return values, input limit, language support, model, and cost. That is sufficient for an agent to understand and invoke the tool correctly.

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?

The single text parameter is fully documented in the schema, and the description adds useful meaning beyond it by stating the input can be any language and giving example text types. The baseline is 3 when schema coverage is high, so this extra context earns a 4.

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 clearly identifies sentiment analysis of text and enumerates the returned signals (label, score, confidence, emotions, per-aspect sentiment). It does not explicitly differentiate itself from sibling AI tools such as ai_keywords or ai_summarize, so it falls short of 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Examples like review, post, email, and support ticket imply when the tool is useful, but there is no explicit when-not guidance or comparison to alternative sibling tools. Usage is therefore implied rather than directed.

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