Skip to main content
Glama
schemas.ts2.38 kB
import { z } from 'zod' const InboxIdSchema = z.string().describe('ID of inbox') const ThreadIdSchema = z.string().describe('ID of thread') const MessageIdSchema = z.string().describe('ID of message') const AttachmentIdSchema = z.string().describe('ID of attachment') export const ListItemsParams = z.object({ limit: z.number().optional().default(10).describe('Max number of items to return'), pageToken: z.string().optional().describe('Page token for pagination'), }) export const GetInboxParams = z.object({ inboxId: InboxIdSchema, }) export const CreateInboxParams = z.object({ username: z.string().optional().describe('Username'), domain: z.string().optional().describe('Domain'), displayName: z.string().optional().describe('Display name'), }) export const ListInboxItemsParams = ListItemsParams.extend({ inboxId: InboxIdSchema, labels: z.array(z.string()).optional().describe('Labels to filter items by'), before: z.string().pipe(z.coerce.date()).optional().describe('Filter items before datetime'), after: z.string().pipe(z.coerce.date()).optional().describe('Filter items after datetime'), }) export const GetThreadParams = z.object({ inboxId: InboxIdSchema, threadId: ThreadIdSchema, }) export const GetAttachmentParams = z.object({ inboxId: InboxIdSchema, threadId: ThreadIdSchema, attachmentId: AttachmentIdSchema, }) const BaseMessageParams = z.object({ inboxId: InboxIdSchema, text: z.string().optional().describe('Plain text body'), html: z.string().optional().describe('HTML body'), labels: z.array(z.string()).optional().describe('Labels'), }) export const SendMessageParams = BaseMessageParams.extend({ to: z.array(z.string()).describe('Recipients'), cc: z.array(z.string()).optional().describe('CC recipients'), bcc: z.array(z.string()).optional().describe('BCC recipients'), subject: z.string().optional().describe('Subject'), }) export const ReplyToMessageParams = BaseMessageParams.extend({ messageId: MessageIdSchema, replyAll: z.boolean().optional().describe('Reply to all recipients'), }) export const UpdateMessageParams = z.object({ inboxId: InboxIdSchema, messageId: MessageIdSchema, addLabels: z.array(z.string()).optional().describe('Labels to add'), removeLabels: z.array(z.string()).optional().describe('Labels to remove'), })

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/agentmail-to/agentmail-toolkit'

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