Skip to main content
Glama
mgcrea
by mgcrea

A2A: Discover Agent

a2a_discover_agent
Read-only

Discover a peer's current capabilities by fetching its agent card, returning its skills and transports, and verifying it is reachable before sending a message.

Instructions

Fetch a peer's agent card from /.well-known/agent-card.json, cache it locally, and return its skills and transports. Always refetches, so it is also how you check whether a peer is up and what it can do NOW — a cached card goes stale the moment the peer restarts. Do this before a2a_send_message to a peer you have not used: the card is what says which A2A binding and URL to speak, and its skill list is what says whether the peer can do the thing at all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe peer's BASE url, e.g. `http://127.0.0.1:41241`. Not the card path: the client appends /.well-known/agent-card.json itself. Get the list from a2a_list_agents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description does not contradict that—the tool only fetches and caches, no mutation. The description adds valuable context: it always refetches, making it the live check for peer status, and it caches the card locally (implying a state change). This is more than just restating the read-only nature; it discloses the caching side-effect and the staleness risk, which is helpful.

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 two sentences, each carrying weight. The first sentence states the core purpose and the always-refetch behavior alerts to staleness. The second provides actionable guidance on when to use and what it enables. No fluff, well front-loaded.

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?

The tool is simple with one parameter, and the description covers the purpose, usage timing, and behavioral nuance (cache, staleness). No output schema exists, but the description mentions it returns skills and transports. No nested objects or enums to worry about. It feels complete for an agent to call 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% (the single `url` parameter is described), but the description adds crucial meaning: it clarifies that the URL should be the base URL, not the card path, and that the client appends the well-known suffix. Also, it tells the agent to obtain the URL from a2a_list_agentscacheList. This is exactly the kind of parameter meaning that the schema alone does not fully convey.

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 clearly states the action (fetch a peer's agent card), the resource (the well-known endpoint), and the purpose (return skills and transports). It also distinguishes itself from siblings by emphasizing the 'always refetches' behavior, which positions it as the tool for checking peer availability and capabilities, different from a2a_list_agents.

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?

Explicitly instructs to use this tool before a2a_send_message to an unfamiliar peer, and explains why (to discover the correct binding, URL, and skills). It also indicates this is a way to check if a peer is up and current, with the caveat about staleness. While it doesn't explicitly mention alternatives or when not to use, the context is clear and direct.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.