Discover tools at runtime with AWS Agent Registry

AWS published a walkthrough of AWS Agent Registry, a managed service for cataloging and discovering Model Context Protocol (MCP) servers, agents and agent skills, and noted that the service is generally available. The post is built around a refactored Python sample that deploys an order-management MCP server through Amazon Bedrock AgentCore Gateway, two agent-to-agent (A2A) agents on AgentCore runtime, a Registry, and an orchestrator, then runs three demos against it.
The problem the sample targets is tool sprawl. Hardcoded tools hold up with a handful of capabilities, start to fray at a few dozen, and become unwieldy beyond that, according to the post. Enterprise systems expose hundreds of internal APIs for pricing, support, orders, inventory and customer data, and in those setups the model can burn more tokens telling tool names apart than reasoning about the request. Every added capability then means an orchestrator code change, a redeploy and a coordinated release across teams that would rather ship on their own schedule.
The proposed pattern is to move tool access from build time to runtime. Instead of compiling every tool into the agent, the orchestrator queries the Registry for relevant capabilities and assembles them per request. Publishers register a searchable description plus a protocol-specific descriptor. Registry search returns connection metadata, not invocation credentials or the authentication scheme, so the application must supply credentials through a separate trusted path.
The loop has three stages. In Discover, the orchestrator sends a natural-language query to the Registry data plane and gets back record identity, name, description, record type, status, version and descriptors such as MCP server metadata or an A2A agent card. In Instantiate, it builds a client from each descriptor: for MCP, the descriptor points at an AgentCore Gateway endpoint and the orchestrator separately fetches a Cognito OAuth access token for the MCPClient; for A2A, the agent card URL identifies an AgentCore runtime endpoint that a wrapper calls through the boto3 data-plane client, signed with the caller's AWS credentials. In Execute, an ephemeral inner agent is built from only the discovered tools, the model picks among them, the result is synthesized, and the agent and clients are torn down when the turn ends. The next request triggers a fresh search and a fresh tool set.
Underneath, the account-level client handles Registry and record lifecycle, and a separate data-plane client handles discovery. Records require a recordType, with MCP for servers and AGENT for A2A-backed agents, and protocol metadata sits under mcpServer or a2aAgentCard in a descriptors object. The published descriptor shapes carry a dataSchemaVersion of 2025-12-11 for the MCP server block, with tool schemas under additionalData at 2025-06-18, and 0.3 for the A2A agent card.
Governance is the gate on discovery. With automatic approval disabled, a record moves from DRAFT to PENDING_APPROVAL to APPROVED, and the submit and status-update calls are IAM-authorized so publisher and approver permissions can be split. Only approved records surface in the discoverable data plane. The search method, search_discoverable_registry_records, does hybrid keyword and semantic matching across a list of registry IDs with a maxResults cap.
The three demos cover different shapes of the loop. An order-status question resolves to a single MCP tool call against the Gateway with no A2A involvement. A pricing-and-discounts question returns both the MCP server and the pricing A2A agent from one query; the model fetches line items, asks the pricing agent for discount analysis, and returns one recommendation. The third is a return-and-refund request where those words do not appear in the matched Customer Support Agent's registered name; the post describes the hybrid search ranking it highly because the description captures the intent, and cautions this is a demo result rather than a general claim that ranking improves as the catalog grows.
The orchestrator is a Strands agent on AgentCore runtime exposing a discover_and_execute tool that does search, descriptor parsing, client creation and request-scoped agent assembly. The sample fans out several search queries to improve recall, deduplicates returned records, and stops MCP clients in a finally block; the post notes that fan-out is a sample-specific choice, not a Registry requirement. The foundation model is an Anthropic Claude Sonnet model addressed through a cross-Region model ID.
On operations, the sample enables Amazon CloudWatch Logs permissions but ships no custom metrics or dashboards. The post lists signals worth instrumenting: search success and failure, selected record identifiers, client-construction errors, downstream invocation outcomes, end-to-end trace correlation and application errors. It also recommends applying Amazon Bedrock Guardrails as a standard control on agent responses.
The post is explicit about where the pattern does not pay off. Small, stable catalogs may be simpler with explicit build-time wiring and one fewer discovery request. Fixed pipelines where the same capabilities always run in the same order are better expressed as deterministic flows with tighter tracing.
This suggests the real design surface shifts to catalog quality. If an agent's reachable capability set is decided by a description and a similarity score, then naming, description wording and evaluation sets become release artifacts as much as code does. A likely trade-off is latency and variance: each turn pays for a search plus client construction, and a weak match can quietly narrow the tools the model sees, whereas a hardcoded list fails loudly when it is wrong. The separation of discovery from authentication is also the piece worth studying closely, since it keeps credentials out of a shared catalog but pushes credential brokering into the calling application.
Why it matters: teams running agents against large internal API surfaces get a way to publish capabilities independently of the orchestrator, with approval policy gating what consumers can see and per-capability auth still their own responsibility. Developers adopting the pattern should expect to invest in descriptions, search evaluation and observability rather than in wiring code, and to keep deterministic pipelines off the Registry. The sample's limits—single account, no built-in metrics, demo-only ranking evidence—mean production use is inference-heavy work that teams will have to validate themselves.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Hardcoded tool wiring breaks down as an agent's catalog grows from a handful of tools to hundreds. This post walks through a runtime Discover, Instantiate, Execute loop built on AWS Agent Registry, where an orchestrator discovers MCP servers and A2A agents through semantic search at runtime instead of compiling every tool at build time.