We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tar-ive/mcp-bluesky-stock-sentiment'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
export interface SentimentResult {
label: "POSITIVE" | "NEGATIVE";
score: number;
}
export async function analyzeSentiment(
text: string,
AI: Ai
): Promise<SentimentResult> {
try {
const result = await AI.run("@cf/huggingface/distilbert-sst-2-int8", {
text: text
});
return result[0] as SentimentResult;
} catch (error) {
console.error("Sentiment analysis error:", error);
return { label: "POSITIVE", score: 0.5 };
}
}