Chapter 12 of 16: Connect permitted actions

How can words cause an action?

Arun MalikSeriesAIFoundations
Table of Contents
Builds on chapter 11. Specific dependencies are in the concept map.

“I added soup to the order” is a sentence. It is not an order record. To affect the cafe's software, the application must execute an allowed operation and check what happened.

A doorway into another program

An API, or application programming interface, is a defined way for software components to communicate. A cafe program might offer an operation to read a menu or add an item to a draft order.

A tool is a capability made available to an AI application for obtaining information or performing an operation. A calculator is a tool. So is a read-only menu lookup. Some tools can change records, which requires more care.

A schema describes the expected structure of data. An add-item operation might require an item identifier and a whole-number quantity. The schema is like the boxes on an order slip: it defines the fields, not whether the order is sensible or authorized.

Order slipAn invented schema gives fields a shape. Valid fields alone do not establish permission or prove the requested item exists.Draft order slipItem ID: soup-01Quantity: 2No authorization here
An invented schema gives fields a shape. Valid fields alone do not establish permission or prove the requested item exists.

A request is not execution

Function calling lets a model produce a structured request for an available operation. The model might request a menu lookup with a particular item ID. Application code or a service runtime receives that request.

Then the application validates the arguments, checks permissions, calls the operation if allowed, and supplies the result for the next model step. A model's proposed call is not a command that must be obeyed.

  1. Model proposesRead menu item soup-01.
  2. Application checks and executesValidate the request and authorize access.
  3. Tool returns an observationSupply the result, then check the actual state before claiming success.
The model requests a tool call. Executing code owns validation, permission checks, and the resulting operation.

Authorization decides whether an identity may perform an operation on particular data. Knowing a customer number is not permission to read that customer's records. The application should enforce access independently of the model's text.

A tool result is the information returned by an executed operation. It may report success, failure, or an uncertain outcome. If a network request times out, the order might still have been created. Repeating the request blindly could create a duplicate.

Check authoritative state, such as the actual draft-order record, before making claims about an action. A success-looking sentence generated by the model is weak evidence.

A shared connection format

Model Context Protocol, or MCP, is a protocol for exchanging tools and context between AI applications and connected programs. A host application uses a client to communicate with a server that can expose tools, resources, or reusable prompts.

Think of a shared connector specification. It can reduce custom wiring, but it does not decide whether every connected appliance is trustworthy. MCP includes security-related mechanisms and guidance; using it does not automatically configure correct authorization or make a tool safe.

You do not need MCP for every tool. A directly integrated API can be enough. Protocol versions and supported capabilities differ, so compatibility is an implementation question.

  1. Host application and clientThe application uses a client to connect.
  2. MCP serverA connected program exposes supported capabilities.
  3. Tools, resources, promptsCapabilities can supply operations, data, or reusable input templates.
MCP defines exchanges between software components. Interoperability does not automatically establish trust or configure permissions.

Instructions in a reusable folder

A skill, in this guide, is a reusable package of task instructions and supporting resources that an agent application can load. It might explain the cafe's menu-writing process, include a template, or provide a script.

SkillA skill packages reusable instructions and resources. The folder can guide tool use without changing model weights.DirectionsTemplate
A skill packages reusable instructions and resources. The folder can guide tool use without changing model weights.

A recipe folder is the analogy: directions and materials ready to consult. Loading it changes available instructions and context, not the model's learned weights. If the package includes executable code, that code still needs review and appropriately limited permissions.

Skills and tools have different jobs. A skill can explain when and how to use a tool. The tool performs the actual operation. Neither name means the model has acquired a permanent new ability through training.

The model requests quantity “many.” Does a valid tool name make that okay?

No. The application should validate the quantity against the schema and task rules. It should reject or clarify invalid input, and still check authorization before any permitted change.