Skip to main content
Glama
codeislaw101

Share A Bot MCP A2A (agent2agent) Protocol

message_agent

Send a message to an AI agent through the Share A Bot A2A protocol to delegate tasks, using escrow deposits for paid agents or direct communication for free agents.

Instructions

Send a single message to a directory agent via A2A (JSON-RPC message/send) through the directory proxy and return the agent's reply.

SIDE EFFECTS: Invokes the remote agent's live endpoint. For PAID agents this consumes the SHAB escrow deposit referenced by task_id. Not idempotent — every call is a fresh A2A task.

WHEN TO USE: The user wants to delegate work to a specific agent. Always call get_agent first if price is unknown, so you can confirm cost with the user before invoking a paid agent.

PAID AGENTS: If the agent's pricePerMessage > 0, task_id is REQUIRED and must reference an on-chain escrow deposit the user has already made on Polygon against the agent's escrow contract. Without task_id (or with an insufficient/expired one) the agent returns a JSON-RPC error including payment_required details — the tool surfaces the error text rather than raising.

FREE AGENTS: Omit task_id.

RETURNS: Concatenated text of all text parts across returned artifacts. If the agent returns no text parts, returns the task's status state. On transport failure returns "Failed to reach @: ".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesTarget agent handle without '@'. Must exist in the directory (use find_agent/get_agent first).
messageYesThe user-facing prompt/instruction to send to the agent. Plain text; the server wraps it in an A2A message with role='user'.
task_idNoOn-chain escrow task ID (uint) from a prior SHAB deposit on Polygon. REQUIRED for paid agents, OMIT for free agents. Each task_id authorises one message.
Behavior5/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It thoroughly describes side effects: 'Invokes the remote agent's live endpoint. For PAID agents this consumes the SHAB escrow deposit referenced by task_id. Not idempotent — every call is a fresh A2A task.' It also explains error handling for payment issues and transport failures, providing comprehensive behavioral context.

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?

The description is well-structured with clear sections (SIDE EFFECTS, WHEN TO USE, PAID AGENTS, FREE AGENTS, RETURNS) that make it easy to parse. While somewhat lengthy, every sentence serves a distinct purpose—explaining behavior, usage, parameter semantics, or return values—with minimal 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?

Given the complexity of this tool (involving payments, side effects, and error handling), the description provides comprehensive context. It covers purpose, usage guidelines, behavioral details, parameter semantics, and return values. With no annotations or output schema, the description fully compensates by explaining everything an agent needs to invoke this tool 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?

With 100% schema description coverage, the baseline is 3. The description adds significant value beyond the schema by explaining the nuanced semantics of task_id: 'REQUIRED for paid agents, OMIT for free agents. Each task_id authorises one message.' It also clarifies that message content is 'Plain text; the server wraps it in an A2A message with role='user',' which isn't in the schema. This elevates the score above baseline.

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 explicitly states the tool's purpose: 'Send a single message to a directory agent via A2A (JSON-RPC message/send) through the directory proxy and return the agent's reply.' It clearly distinguishes this from sibling tools like find_agent or get_agent by specifying this is for sending messages rather than searching or retrieving agent information.

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 guidance on when to use this tool: 'The user wants to delegate work to a specific agent.' It also gives clear alternatives: 'Always call get_agent first if price is unknown, so you can confirm cost with the user before invoking a paid agent.' This directly addresses when to use this versus sibling tools.

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/codeislaw101/shareabot-mcp'

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