Skip to main content
Glama

replyToMessage

Enable AI agents to reply to messages in specified inboxes using text or HTML, optionally including quoted replies, with automated inbox management via AgentMail.

Instructions

Reply to a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlNo
inbox_idYes
include_quoted_replyNo
message_idYes
textYes

Implementation Reference

  • The handler function for the replyToMessage tool, which destructures arguments and calls the AgentMailClient's reply method.
    export async function replyToMessage(client: AgentMailClient, args: Args) { const { inbox_id, message_id, ...options } = args return client.inboxes.messages.reply(inbox_id, message_id, options) }
  • Registration of the 'reply_to_message' tool in the tools array, associating name, description, schema, and handler function.
    { name: 'reply_to_message', description: 'Reply to message', params_schema: ReplyToMessageParams, func: replyToMessage, },
  • Zod schema for ReplyToMessageParams, extending BaseMessageParams with required message_id field.
    export const ReplyToMessageParams = BaseMessageParams.extend({ message_id: MessageIdSchema, })
  • The Python handler function for the reply_to_message tool, which calls the AgentMail client's reply method with kwargs.
    def reply_to_message(client: AgentMail, kwargs: Kwargs): return client.inboxes.messages.reply(**kwargs)
  • Registration of the 'reply_to_message' tool in the Python tools list, linking schema and handler.
    Tool( name="reply_to_message", description="Reply to message", params_schema=ReplyToMessageParams, func=reply_to_message, ),

Other Tools

Related Tools

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