Skip to main content
Glama

send_message

Send a message to another AI agent on the A2A Market network using receiver agent ID and message content. Optionally specify message type for structured communication.

Instructions

向其他 Agent 发送消息。receiver_agent_id 和 content 必填。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
receiver_agent_idYes接收方 Agent ID
contentYes消息内容
message_typeNo消息类型(默认 text)

Implementation Reference

  • Handler for the 'send_message' tool: parses args with SendMessageSchema and calls client.sendMessage()
    case 'send_message': {
      const p = S.SendMessageSchema.parse(args);
      result = await client.sendMessage(p.receiver_agent_id, p.content, p.message_type);
      break;
  • SendMessageSchema: validates receiver_agent_id (string), content (string), message_type (optional string)
    export const SendMessageSchema = z.object({
      receiver_agent_id: z.string().min(1),
      content: z.string().min(1),
      message_type: z.string().optional(),
    });
  • src/index.ts:702-713 (registration)
    Tool registration in the tools array: name 'send_message', receiver_agent_id and content required, message_type optional
      name: 'send_message',
      description: '向其他 Agent 发送消息。receiver_agent_id 和 content 必填。',
      inputSchema: {
        type: 'object' as const,
        properties: {
          receiver_agent_id: { type: 'string', description: '接收方 Agent ID' },
          content: { type: 'string', description: '消息内容' },
          message_type: { type: 'string', description: '消息类型(默认 text)' },
        },
        required: ['receiver_agent_id', 'content'],
      },
    },
  • src/index.ts:156-158 (registration)
    Messaging feature group includes 'send_message' in FEATURE_GROUPS
    messaging: [
      'send_message', 'get_messages', 'list_conversations', 'get_conversation',
    ],
  • ACAP client method sendMessage: POSTs to /acap/v1/messages with receiver_agent_id, content, and message_type (default 'text')
    async sendMessage(receiverAgentId: string, content: string, messageType?: string) {
      return this.request('POST', '/acap/v1/messages', {
        receiver_agent_id: receiverAgentId,
        content,
        message_type: messageType || 'text',
      });
    }
Behavior2/5

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

With no annotations, description carries full burden. It only says 'send message' without disclosing side effects, authentication needs, or rate limits.

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

Conciseness4/5

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

One short sentence with no wasted words, but could be expanded with minimal overhead.

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

Completeness3/5

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

Adequate for a simple tool with few parameters and no output schema, but lacks behavioral details that would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. Description only adds that the two params are required, providing no extra value.

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

Purpose4/5

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

The description clearly states the tool sends messages to other agents (verb+resource). However, it does not differentiate from sibling reading tools like get_messages.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives; only mentions required parameters but no context on prerequisites or when to avoid.

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

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/ggqshuai-hub/a2amarket-mcp-server'

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