Skip to main content
Glama

Reddit MCP Server

by ozipi
get-notifications.ts825 B
import { RedditError } from '../../types/reddit.js'; import { formatToolResponse } from './types.js'; import type { ToolHandler, GetNotificationsArgs} from './types.js'; export const handleGetNotifications: ToolHandler<GetNotificationsArgs> = async ( args, { redditService }, ) => { try { const notifications = await redditService.fetchNotifications(args); return formatToolResponse({ message: `Found ${notifications.length} notifications`, result: { notifications }, }); } catch (error) { return formatToolResponse({ status: "error", message: `Failed to fetch notifications: ${error instanceof Error ? error.message : "Unknown error"}`, error: { type: error instanceof RedditError ? error.type : "API_ERROR", details: error, }, }); } };

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/ozipi/brainloop-mcp-server-v2'

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