Skip to main content
Glama

detect_sarcasm

Analyze the mismatch between text sentiment and audio emotion to detect sarcasm in speech.

Instructions

Detect sarcasm by comparing text sentiment with audio emotion.

This tool detects sarcasm by analyzing the mismatch between the sentiment of the text and the emotional tone of the audio. For Lite tier, the 'text' parameter is required for accurate detection.

Args: audio_path: Path to the audio file (WAV format supported) text: Transcription text (recommended for Lite tier)

Returns: Dictionary containing: - is_sarcastic: Boolean indicating sarcasm detection - confidence: Confidence score (0.0 to 1.0) - indicators: List of indicators that suggest sarcasm - text_emotion: Detected emotion from text (if available) - audio_emotion: Detected emotion from audio

Example: { "is_sarcastic": true, "confidence": 0.82, "indicators": ["Positive text with negative audio tone"], "text_emotion": "positive", "audio_emotion": "sad" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_pathYes
textNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the detection mechanism (mismatch between text sentiment and audio emotion) and the return structure in detail. It also notes a requirement variance for Lite tier, which is helpful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise but includes a full docstring-style Args/Returns section. Some repetition occurs (e.g., 'detect sarcasm' twice). The structure is clear but could be trimmed without losing meaning.

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?

The tool has an output schema (not shown) and the description includes an example output. It covers purpose, parameters, return format, and a usage note. For a specialized tool, this is fairly complete, though it could better differentiate from siblings.

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 explains that audio_path is a path to a WAV file and text is transcription text, recommended for Lite tier. This adds format and usage information beyond the schema's type definitions.

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 'Detect sarcasm by comparing text sentiment with audio emotion.' This provides a specific verb (detect) and resource (sarcasm), and the unique approach (comparison) distinguishes it from siblings like analyze_audio and full_analysis.

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 mentions that for Lite tier, the 'text' parameter is recommended for accurate detection, giving some usage context. However, it does not explicitly state when not to use this tool or suggest alternative tools from the sibling list.

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/sophieMiao/speechpulse'

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