Skip to main content
Glama

sentiment_analysis

Classify text sentiment as positive, negative, or neutral with a compound score and confidence. Handles negation, sarcasm, and mixed emotions in reviews, social posts, and support tickets.

Instructions

Analyse the emotional tone and sentiment of a piece of text.

Uses a fine-tuned language model to classify the overall sentiment and
return a continuous compound score. Handles negation, sarcasm signals,
and mixed-sentiment text. Works well on reviews, social posts, support
tickets, survey responses, and news excerpts.

Args:
    text: Text to analyse. Optimal range: 10–2000 characters.
          For longer documents, pass key paragraphs separately.

Returns:
    label: Overall sentiment — 'positive', 'negative', or 'neutral'.
    compound: Score from -1.0 (most negative) to +1.0 (most positive).
    confidence: Model confidence in the classification, 0.0–1.0.
    positive: Proportion of positive signal in the text.
    negative: Proportion of negative signal in the text.
    neutral: Proportion of neutral signal in the text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
Behavior4/5

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

With no annotations, the description must disclose behavior. It mentions handling negation, sarcasm, and mixed sentiment, and uses a fine-tuned model. It does not cover rate limits, authentication, or error handling, but for a text analysis tool these are less critical. The transparency is high overall.

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 description is well-structured with clear sections and bullet-like formatting for parameters and returns. It is moderately concise; a few phrases could be trimmed (e.g., 'Uses a fine-tuned language model' is implied), but overall it communicates efficiently without unnecessary 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?

Given the absence of an output schema and annotations, the description comprehensively covers the tool's purpose, inputs, behaviors, and outputs. It provides usage context, parameter details, and return field descriptions, making it fully self-contained for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description carries full responsibility. It explains the 'text' parameter in detail: what it is (text to analyse), optimal range (10–2000 chars), and how to handle longer inputs. It also fully documents return fields (label, compound, confidence, positive/negative/neutral proportions), adding significant value.

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?

The description clearly states the tool's purpose: 'Analyse the emotional tone and sentiment of a piece of text.' The verb 'analyse' and resource 'sentiment' are specific. It distinguishes from sibling tools, which are unrelated (e.g., validate_email, dns_lookup), making selection unambiguous.

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?

The description lists suitable text types (reviews, social posts, etc.) and provides an optimal character range (10–2000). It advises splitting long documents, which is useful guidance. While it doesn't explicitly state when not to use the tool, the context is clear enough for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ForeverTools/kiprio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server