Skip to main content
Glama

sendMessage

Send messages securely within isolated inboxes on AgentMail. Specify recipients, subject, text, and optional HTML for AI agents to communicate effectively.

Instructions

Send a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bccNo
ccNo
htmlNo
inbox_idYes
subjectYes
textYes
toYes

Implementation Reference

  • Handler function that sends a message using the AgentMailClient by calling client.inboxes.messages.send.
    export async function sendMessage(client: AgentMailClient, args: Args) {
        const { inbox_id, ...options } = args
        return client.inboxes.messages.send(inbox_id, options)
    }
  • Handler function that sends a message using the AgentMail client by calling client.inboxes.messages.send.
    def send_message(client: AgentMail, kwargs: Kwargs):
        return client.inboxes.messages.send(**kwargs)
  • Zod schema for SendMessage parameters, extending BaseMessageParams with to, cc, bcc, and subject fields.
    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'),
    })
  • Pydantic model for SendMessage parameters, inheriting from BaseMessageParams with to, cc, bcc, and subject fields.
    class SendMessageParams(BaseMessageParams):
        to: List[str] = Field(description="Recipients")
        cc: Optional[List[str]] = Field(description="CC recipients")
        bcc: Optional[List[str]] = Field(description="BCC recipients")
        subject: Optional[str] = Field(description="Subject")
  • Registration of the send_message tool in the tools array, linking schema and handler function.
    {
        name: 'send_message',
        description: 'Send message',
        params_schema: SendMessageParams,
        func: sendMessage,
    },
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Send a message' implies a write operation but reveals nothing about permissions required, whether the message is queued or sent immediately, rate limits, error conditions, or what happens upon success. For a mutation tool with 7 parameters and no annotation coverage, this is completely inadequate.

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

Conciseness5/5

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

The description is extremely concise at just two words, with zero wasted language. While this brevity contributes to under-specification in other dimensions, from a pure conciseness perspective, it's maximally efficient with every word earning its place.

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?

For a tool with 7 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, provides no parameter guidance, offers no behavioral context, and gives no indication of return values. This leaves the agent with insufficient information to use the tool effectively.

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?

Schema description coverage is 0%, meaning none of the 7 parameters have descriptions in the schema. The tool description provides no information about parameters, not even mentioning key fields like 'to', 'subject', or 'inbox_id'. This leaves all parameter meanings undocumented, failing to compensate for the schema's lack of coverage.

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 'Send a message' is a tautology that merely restates the tool name without specifying what type of message or to what system. It lacks distinction from sibling tools like 'replyToMessage' and doesn't clarify if this is for email, chat, or another messaging system. While the verb 'send' is clear, the resource 'message' is too vague given the context of other email-related tools.

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?

No guidance is provided on when to use this tool versus alternatives like 'replyToMessage'. The description doesn't mention prerequisites, context, or exclusions. Given the sibling tools include various email-related functions, this omission leaves the agent without direction on selecting the appropriate tool for sending a new message versus replying.

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