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,
    ),
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers none. It doesn't indicate whether this is a read or write operation, what permissions are required, how replies are formatted or delivered, or any side effects. This leaves critical behavioral traits completely undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just three words, which could be efficient if it were informative. However, it's under-specified rather than appropriately concise—it wastes no words but fails to convey necessary information, making this borderline between minimal and inadequate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a messaging tool with 5 parameters, no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It doesn't explain what the tool does beyond the name, how to use it, what parameters mean, or what to expect in return, failing to provide essential context for effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides no information about parameters, while the input schema has 0% description coverage (titles only, no descriptions). With 5 parameters (3 required) and no parameter semantics explained in either the schema or description, the agent lacks essential context for what each parameter means and how to use them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Reply to a message' is a tautology that restates the tool name 'replyToMessage' without adding specificity. It mentions the verb 'reply' and resource 'message' but fails to distinguish this from sibling tools like 'sendMessage' or provide any details about what replying entails in this context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing an existing message to reply to, nor does it differentiate from 'sendMessage' or other messaging tools in the sibling list, leaving the agent with no usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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