/** * @sh-mcp/gmail public exports. * * The tools array is the primary export consumed by the server registry. * Each tool is constructed with an injected GmailClient so that the server * can supply the real GmailApiClient while tests supply a mock. * * Usage in a server: * * import { makeGmailTools } from '@sh-mcp/gmail'; * import { GmailApiClient, LiveGoogleTokenProvider } from '@sh-mcp/gmail/client'; * * const tools = makeGmailTools(new GmailApiClient(new LiveGoogleTokenProvider())); * registry.register(tools); */ export { GmailApiClient } from './client.js'; export { InMemoryGmailClient } from './dev-client.js'; export type { GmailClient, GoogleTokenProvider, EmailMessage, EmailThread, SearchInboxParams, GetThreadDetailParams, } from './client.js'; export type { SearchInboxInput, SearchInboxOutput, GetEmailThreadDetailInput, GetEmailThreadDetailOutput, } from './tools.js'; export { makeSearchInboxTool, makeGetEmailThreadDetailTool } from './tools.js'; import type { GmailClient } from './client.js'; import type { ToolDef } from '@sh-mcp/shared'; import { makeSearchInboxTool, makeGetEmailThreadDetailTool } from './tools.js'; /** * Convenience factory: returns all gmail tools wired to the given client. * The server passes this array to its tool registry. */ export function makeGmailTools(client: GmailClient): ToolDef[] { return [ makeSearchInboxTool(client) as ToolDef, makeGetEmailThreadDetailTool(client) as ToolDef, ]; }