Skip to main content
Glama

Send A2A Message

a2a_send_message

Send text messages to any A2A-compliant agent and get either an immediate response or a task object for async handling. Use an existing task ID to follow up on ongoing conversations.

Instructions

Send a message to an Agent-to-Agent (A2A) protocol compliant agent.

This tool establishes communication with an A2A agent and sends a text message. The agent may respond immediately with a message or return a task object for asynchronous processing.

Args:

  • agentCardUrl (string): URL to the agent's card endpoint, typically at /.well-known/agent-card.json

  • message (string): The text message to send to the agent (1-10,000 characters)

  • taskId (string, optional): Existing task ID to continue a conversation thread. If provided, the message is sent as a follow-up to the specified task.

Returns: JSON response containing either:

  • A message object with the agent's immediate response

  • A task object for asynchronous operations, containing:

    • id: Task identifier

    • status: Current task state and progress

    • artifacts: Any generated outputs or results

    • kind: Response type ("message" or "task")

The response may include multiple parts (text, images, etc.) depending on the agent's capabilities.

Examples:

Error Handling:

  • Returns "Error: Failed to connect to agent" if the agent URL is unreachable

  • Returns "Error: Invalid agent card" if the card endpoint doesn't return valid A2A metadata

  • Returns "Error: Message sending failed" if the agent rejects the message

  • If a task is returned, use a2a_get_task to poll for completion status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdNoOptional task ID to continue an existing conversation thread
messageYesThe text message to send to the agent
agentCardUrlYesURL to the agent's card endpoint (e.g., https://example.com/.well-known/agent-card.json)
Behavior5/5

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

Annotations already set readOnlyHint=false and idempotentHint=false, but the description adds significant behavioral context: the tool may return an immediate message or an async task object, responses can contain multiple parts, and specific error strings are documented. This goes well beyond the structured annotations.

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?

Although longer than average, the description is well-structured with dedicated Arg, Returns, Examples, and Error Handling sections. Every sentence contributes either parameter semantics, usage guidance, async behavior, or error troubleshooting—no filler or redundancy.

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

Completeness5/5

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

With no output schema, the description thoroughly documents the possible return shapes (message vs. task), async workflow, error strings, and follow-up polling behavior. It also covers all three parameters and names sibling tools where relevant, making it complete for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100% with descriptions for all three parameters, so the baseline is 3. The description adds value by explaining the taskId continues a conversation thread, specifying message length in the Args section, and providing realistic example parameter values that illustrate correct usage.

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

Purpose5/5

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

The description begins with a specific verb and resource: 'Send a message to an Agent-to-Agent (A2A) protocol compliant agent.' This cleanly distinguishes it from sibling tools like a2a_get_task, a2a_cancel_task, and a2a_get_agent_card, all of which have obviously different purposes.

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

Usage Guidelines5/5

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

The description provides explicit 'Use when' and 'Don't use when' guidance with concrete examples, directly naming sibling alternatives for cancellation and status checks. It also advises using a2a_get_task for polling when a task object is returned, giving the agent clear decision criteria.

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/ericabouaf/a2a-mcp-server'

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