Skip to main content
Glama
zqushair
by zqushair
getInbox.ts1.2 kB
import { BaseRequestHandler } from '../base.js'; import { frontappClient } from '../../../clients/frontapp/index.js'; import { GetInboxArguments, ToolResponse } from '../../../models/mcp.js'; /** * Handler for the get_inbox tool * Retrieves details of a specific inbox from Frontapp */ export class GetInboxHandler extends BaseRequestHandler<GetInboxArguments> { /** * Validate the arguments passed to the tool * @param args The arguments to validate * @throws Error if the inbox_id is missing */ protected validateArgs(args: GetInboxArguments): void { if (!args.inbox_id) { throw new Error('inbox_id is required'); } } /** * Execute the request to get inbox details * @param args The validated arguments * @returns A response with the inbox data */ protected async execute(args: GetInboxArguments): Promise<ToolResponse> { // Extract the inbox ID const { inbox_id } = args; // Call the Frontapp API const response = await frontappClient.getInbox(inbox_id); // Return the response return this.createSuccessResponse(response.data); } } // Export a singleton instance export const getInboxHandler = new GetInboxHandler();

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/zqushair/Frontapp-MCP'

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