Concepts

Tool Use (Function Calling)

Definition

Tool use - also called function calling - is the ability of an AI model to invoke external functions, APIs, and services during a conversation to retrieve information or take actions in the real world. Instead of relying solely on its training knowledge, an AI model with tool use can search a product catalog, check live pricing, verify inventory, add items to a cart, or trigger a checkout flow.

This capability is what transforms a language model from a conversational interface into an agent that can act. Without tool use, an AI assistant can only talk about products based on what it learned during training. With tool use, it can actively query your store’s catalog, pull current prices, and check whether a specific size is in stock right now.

Tool use works through a defined contract. The AI model is given a list of available tools, each described with a name, purpose, and required parameters. When the model determines a tool would help, it generates a structured function call. The system executes it, returns the result, and the model incorporates it into its response.

Why It Matters

Tool use is the technical capability that makes agentic commerce possible. Every major AI shopping feature relies on it.

From conversation to action. Before tool use, AI could discuss products. With tool use, AI can shop. When ChatGPT generates a product recommendation with a current price and checkout link, that data came from a tool call to a product API. When a Shopify store’s products appear in Claude’s responses, that happened through MCP tool calls to the store’s product endpoint.

Real-time accuracy. AI training data is always stale to some degree. Tool use solves this by fetching live data at query time. A tool call to a store’s API returns today’s price, current stock levels, and active promotions - not the information from when the model was last trained.

Commerce protocol foundation. MCP, ACP, and other agentic commerce protocols are fundamentally tool use frameworks applied to commerce. ACP defines tools like “search products,” “get product details,” and “create checkout.” The AI model calls these tools to interact with a store’s catalog. Without tool use as a core AI capability, these protocols would have no mechanism to function.

The quality bar rises. Tool use means AI agents can ask very specific questions about your products. “Is the blue version available in size large?” is a tool call, not a vague web search. If your product data cannot answer that question precisely, the agent will skip your product entirely.

How It Works

Tool use operates through a structured cycle:

Tool definition. Available tools are described to the AI model using a schema. Each tool has a name (like “search_products”), a description of what it does, and a specification of the parameters it accepts (like “query,” “price_max,” “category”). The model uses these descriptions to decide when and how to call each tool.

Tool selection. When processing a user’s request, the model assesses whether any available tools would help. If a user asks “find me a red dress under $150,” the model recognizes this requires a product search and selects the appropriate tool.

Function call generation. The model generates a structured function call with the appropriate parameters - calling “search_products” with parameters for color, category, and maximum price.

Execution and synthesis. The system executes the call against the actual API, returns the results, and the model incorporates them into a natural language response presenting matching products with their details.

Multi-step tool use is where agentic commerce gets powerful. A single shopping interaction might involve multiple sequential tool calls: searching products, getting details, checking variant availability, then generating a checkout link.

For merchants, this means product data needs to be available as tool endpoints (through MCP, ACP, or API access) and complete enough to answer specific queries. Tool use calls functions with precise parameters and expects structured responses. Incomplete data means incomplete results.

Stay ahead on agentic commerce

New research, experiments, and insights on how AI agents are reshaping e-commerce. No spam, just signal.