Skip to main content
Glama

Sentiment analysis

blackwood_text_sentiment
Read-onlyIdempotent

Use when you need sentiment analysis, text sentiment or opinion mining of reviews, comments or headlines in English. Do not use for neutral or emotion labels, non-English text or aspect-level sentiment. Returns JSON with sentiment analysis of English text: a positive or negative label with a confidence score, from DistilBERT SST-2 on Workers AI, for one text or a batch of up to 20 for 0.004 USDC per call. Typical response time 1500 ms (p95). Category: Inference.

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

Input Schema

NameRequiredDescriptionDefault
textNoOne English text to classify, e.g. The checkout was fast (up to 2000 characters)
textsNoOr a batch of up to 20 English texts, e.g. ["Great support", "Broken on arrival"]
response_formatNoconcise (the default when omitted) keeps the JSON short: long fields such as base64 images or audio come back as separate image/audio content blocks and other long strings are cut with a marker; detailed returns the full JSON

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "model": {
      -        "type": "string"
      -      },
      -      "results": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "label": {
      -              "enum": [
      -                "positive",
      -                "negative"
      -              ],
      -              "type": "string"
      -            },
      -            "negative": {
      -              "type": "number"
      -            },
      -            "positive": {
      -              "type": "number"
      -            },
      -            "score": {
      -              "type": "number"
      -            },
      -            "text": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "text",
      -            "label",
      -            "score",
      -            "positive",
      -            "negative"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "results",
      -      "model"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "x402 PaymentRequired (returned with isError when payment is needed)",
      -    "properties": {
      -      "accepts": {
      -        "items": {
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "error": {
      -        "type": "string"
      -      },
      -      "extensions": {
      -        "type": "object"
      -      },
      -      "resource": {
      -        "type": "object"
      -      },
      -      "x402Version": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "x402Version",
      -      "accepts"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "model": {
      +        "type": "string"
      +      },
      +      "next": {
      +        "additionalProperties": false,
      +        "description": "Suggested next paid call in the same family (call it in a loop when the task continues)",
      +        "properties": {
      +          "method": {
      +            "enum": [
      +              "GET",
      +              "POST"
      +            ],
      +            "type": "string"
      +          },
      +          "sample": {
      +            "description": "Free fixed sample of the whole family",
      +            "type": "string"
      +          },
      +          "service": {
      +            "description": "Service id of the suggested next paid call",
      +            "type": "string"
      +          },
      +          "tool": {
      +            "description": "MCP tool name of the same call",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "Paid route of the next call",
      +            "type": "string"
      +          },
      +          "useWhen": {
      +            "description": "When the next call is the right one",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "service",
      +          "tool",
      +          "method",
      +          "url",
      +          "useWhen",
      +          "sample"
      +        ],
      +        "type": "object"
      +      },
      +      "results": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "label": {
      +              "enum": [
      +                "positive",
      +                "negative"
      +              ],
      +              "type": "string"
      +            },
      +            "negative": {
      +              "type": "number"
      +            },
      +            "positive": {
      +              "type": "number"
      +            },
      +            "score": {
      +              "type": "number"
      +            },
      +            "text": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "text",
      +            "label",
      +            "score",
      +            "positive",
      +            "negative"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "results",
      +      "model"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "x402 PaymentRequired (returned with isError when payment is needed)",
      +    "properties": {
      +      "accepts": {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "error": {
      +        "type": "string"
      +      },
      +      "extensions": {
      +        "type": "object"
      +      },
      +      "resource": {
      +        "type": "object"
      +      },
      +      "x402Version": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "x402Version",
      +      "accepts"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive safety, and the description layers on valuable operational context beyond them: the underlying model (DistilBERT SST-2 on Workers AI), per-call cost (0.004 USDC), p95 latency (~1500 ms), and batch cap (20). These are the traits an agent needs to budget a call.

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?

Front-loaded with the usage trigger and exclusions, followed by return/cost/latency facts; every clause earns its place. It is dense and slightly run-on but not padded.

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?

With an output schema present, return-value detail isn't strictly required, yet the description still summarizes the output (label + confidence score) and adds cost, latency, model, and limits. Nothing material for correct invocation is missing.

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?

Schema description coverage is 100%, so the schema documents text/texts/response_format fully; the description only echoes the batch size and single-vs-batch choice. The response_format tradeoff is explained in the schema, not the description, so the baseline 3 is appropriate.

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 states a specific verb+resource (sentiment analysis of English text) and enumerates the exact task variants it covers ('text sentiment or opinion mining of reviews, comments or headlines'). It is clearly distinguishable from siblings like blackwood_text_summarize and blackwood_text_translate, which operate on different tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It gives explicit 'use when' conditions and equally explicit exclusions ('Do not use for neutral or emotion labels, non-English text or aspect-level sentiment'). The agent knows precisely when this tool is and isn't the right pick.

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