Performs deterministic sentiment analysis on text using predefined word lists, returning positive, negative, or neutral classifications with confidence scores. Access via MCP in Cursor or Windsurf, or REST API at `/v1/text/sentiment`. Example: "I love this product" returns positive with high confidence. Uses lexicon-based scoring rather than ML models for consistent results.
curl "https://tinyfn.io/v1/text/sentiment" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/text/sentiment', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/text/sentiment',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's text analysis tools:
{
"mcpServers": {
"tinyfn-text": {
"url": "https://tinyfn.io/mcp/text",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Uses predefined word lists with sentiment scores rather than machine learning. More predictable but less nuanced than neural networks—good for consistent classification across similar inputs.
Returns sentiment label (positive/negative/neutral) with numerical confidence score typically ranging 0-1. Also includes word-level breakdown showing which terms influenced the classification.
Yes, perfect for analyzing commit messages, code comments, or user feedback within your development workflow. Claude Code and Cursor can process multiple text snippets efficiently.
Lexicon-based analysis struggles with sarcasm and irony since it lacks contextual understanding. Mixed sentiment returns the dominant polarity based on word counts and weights.
Basic sentiment uses word lists for fast, deterministic results. Advanced NLP considers context, negation, and linguistic patterns but requires more processing time and complexity.
Get your free API key and start using Basic Sentiment in seconds.
Get Free API Key