Skip to main content
Glama

send_message

Send messages to A2A agents and receive immediate status or pending task IDs for background result retrieval.

Instructions

Sends a message to an agent and returns the task status.

This function initiates a task with an agent. It will return quickly.

  • If the agent responds within 5 seconds, the final result is returned.

  • Otherwise, a 'pending' status is returned, and the gateway continues to fetch the result in the background. Use the 'get_task_result' tool with the returned 'task_id' to check for completion.

Args: agent_url (str): The URL of the registered A2A agent. message (str): The text message to send. session_id (Optional[str]): An optional identifier for conversation context. ctx (Context): The MCP context for logging.

Returns: Dict[str, Any]: A dictionary representing the task. It will contain the final result if completed quickly, or a pending status if the agent takes longer to respond.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_urlYes
messageYes
session_idNo

Tool Definition Quality

Score is being calculated. Check back soon.

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/yw0nam/mcp_a2a_gateway'

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