Skip to main content
Glama
crisjonblvx

enrichrapi-mcp

by crisjonblvx

classify_text

Classify text by sentiment, toxicity, spam, and language using keyword heuristics. Receive scores, character and word counts, and cost for any text input.

Instructions

Classify a piece of text with keyword heuristics.

Not a trained NLP or toxicity model. Scores sentiment (positive/negative/neutral), keyword toxicity, keyword spam, and optional langdetect language.

Args: text: The text to classify (up to ~5,000 characters recommended)

Returns: dict with keys: method (heuristic), sentiment, toxicity_score, spam_score, language, char_count, word_count, cost_usd

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and handles it well. It discloses that classification is heuristic, not ML-based, lists exactly what is scored, and enumerates the return keys including method, scores, language, and cost. It does not dig into score ranges or error behavior, but the core behavioral caveat is clearly surfaced.

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 compact, well-organized, and front-loaded. The first line gives purpose, the second line adds an important caveat, and the Args/Returns sections provide structured details without fluff. Every sentence earns its place.

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 simple one-parameter tool with no output schema, the description covers the essential invocation context: input, length recommendation, method, and return keys. Minor omissions such as score ranges or the meaning of 'optional langdetect language' prevent a perfect score, but nothing critical blocks correct invocation.

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 description coverage is 0%, so the description must compensate. It does by explaining that 'text' is the piece of text to classify and by adding a practical constraint: 'up to ~5,000 characters recommended.' This goes beyond the schema's bare string type and is sufficient for a single-parameter tool.

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 specific verb and resource: 'Classify a piece of text with keyword heuristics.' It also lists the classification dimensions (sentiment, toxicity, spam, language) and explicitly notes it is not a trained NLP or toxicity model. However, it does not directly differentiate itself from the sibling tool filter_profanity, relying instead on the general purpose being clear.

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?

The description implies usage through the caveat 'Not a trained NLP or toxicity model' and 'keyword heuristics,' suggesting it is for lightweight, explainable classification rather than high-accuracy ML tasks. It does not explicitly state when to use this tool versus alternatives or name any sibling tools as better fits for specific scenarios.

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