Retrieval as a tool: function calling and MCP clients
Lesson 4 of 4 in Retrieval Engineering.
Classic RAG retrieves on every request, whether the question needs it or not. The alternative is to expose retrieval as a tool the model invokes when it decides to. With function calling (the Converse API's toolConfig), the application advertises a search tool — name, description, JSON schema — and the model may answer directly or return a toolUse block with arguments; the application executes the vector search and returns a toolResult, and generation continues with real passages in context.
The second half is standardization. MCP — the Model Context Protocol — gives the application one client speaking one protocol to any number of retrieval servers: the vector store, the document system, the internal wiki each sit behind an MCP server exposing tools, and swapping or adding backends never changes the application side. The phrase in the AIP-C01 exam guide is "consistent access mechanisms … for seamless integration": function calling interfaces for vector search, MCP clients for vector queries, standardized API patterns for retrieval augmentation. (The agentic systems built on this live in the next domain.)
Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.