Skip to main content
Glama
Garoth

SendGrid MCP Server

by Garoth

list_verified_senders

Retrieve all verified sender identities from your SendGrid account to manage email authentication and ensure deliverability.

Instructions

List all verified sender identities in your SendGrid account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'list_verified_senders' tool within the handleToolCall switch statement. It calls service.getVerifiedSenders() and formats the response as JSON text.
    case 'list_verified_senders': const senders = await service.getVerifiedSenders(); return { content: [{ type: 'text', text: JSON.stringify(senders, null, 2) }] };
  • The input schema and metadata definition for the 'list_verified_senders' tool in the getToolDefinitions array.
    { name: 'list_verified_senders', description: 'List all verified sender identities in your SendGrid account', inputSchema: { type: 'object', properties: {}, required: [] } },
  • The core helper method in SendGridService that retrieves verified senders from the SendGrid API endpoint /v3/verified_senders.
    async getVerifiedSenders() { const [response] = await this.client.request({ method: 'GET', url: '/v3/verified_senders' }); return response.body; }
  • src/index.ts:42-46 (registration)
    MCP server registration for listing tools, which includes 'list_verified_senders' via getToolDefinitions.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: getToolDefinitions(sendGridService) }; });
  • src/index.ts:52-75 (registration)
    MCP server registration for tool calls, which routes to handleToolCall including the 'list_verified_senders' case.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { try { return await handleToolCall(sendGridService, request.params.name, request.params.arguments); } catch (error: any) { console.error('SendGrid Error:', error); // Handle SendGrid API errors if (error.response?.body?.errors) { throw new McpError( ErrorCode.InternalError, `SendGrid API Error: ${error.response.body.errors.map((e: { message: string }) => e.message).join(', ')}` ); } // Handle other errors if (error instanceof Error) { throw new McpError( ErrorCode.InternalError, error.message ); } throw new McpError(ErrorCode.InternalError, 'An unexpected error occurred'); }

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/Garoth/sendgrid-mcp'

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