Skip to main content
Glama
profile-get.ts901 B
import {z} from 'zod'; import type {McpServer} from '@modelcontextprotocol/sdk/server/mcp.js'; import type {Config} from './types.js'; import {makeGmailApiCall} from '../utils/gmail-api.js'; import {jsonResult} from '../utils/response.js'; const outputSchema = z.object({ emailAddress: z.string(), messagesTotal: z.number().optional(), threadsTotal: z.number().optional(), historyId: z.string().optional(), }); export function registerProfileGet(server: McpServer, config: Config): void { server.registerTool( 'gmail_get_profile', { title: 'Get profile', description: 'Get the current user\'s Gmail profile including email address', inputSchema: {}, outputSchema, annotations: { readOnlyHint: true, }, }, async () => { const result = await makeGmailApiCall('GET', '/users/me/profile', config.token); return jsonResult(outputSchema.parse(result)); }, ); }

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/domdomegg/gmail-mcp'

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