indic_sentiment
Analyze sentiment and detect emotions in Indian languages including Hinglish text to understand user opinions and emotional responses.
Instructions
Sentiment analysis with emotion detection in Indian languages including Hinglish. Cost: $0.003 USDC. Service: indic.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| language | Yes |
Implementation Reference
- src/index.ts:166-223 (handler)The dynamic tool handler that dispatches calls to remote endpoints based on the registry, which would include 'indic_sentiment' if it exists in the remote registry.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; let registry: Registry; try { registry = await fetchRegistry(); } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Failed to fetch tool registry", detail: String(error) }), }, ], }; } const tool = registry.tools.find((t) => t.name === name); if (!tool) { return { content: [ { type: "text", text: JSON.stringify({ error: `Tool '${name}' not found`, available_tools: registry.tools.map((t) => t.name), }), }, ], }; } try { const result = await callTool(tool, args as Record<string, unknown>); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Tool call failed", tool: name, service: tool.service, detail: String(error), }), }, ], }; } });