Sierra wanted its internal agents to work with GitHub, so it connected GitHub’s full-featured MCP server through its gateway13. The agents then spent a long time discovering the server’s hundreds of tools, and large responses bloated the context window13. Sierra switched to the gh command-line tool, which models already know, and gave the agent a read-only token limited to specific repositories13. Same capability, different packaging. This chapter is about that choice.
Section 4.1
Five packagings, four questions
Chapter two divided every tool into three layers: the contract (which includes the name, description, input schema, result, and errors), the implementation that runs the tool, and the knowledge of how to use it. A packaging is a choice about where each layer resides. We will ask the same four questions for each packaging we discuss:
- Where does the contract come from?
- Where does the implementation run?
- Where does the knowledge live?
- How does the model learn the tool exists at all?
Each section below will complete one row of our table. Then, it will explain what the packaging solves and what it does not, which a table cannot fully show.
Vendors also define these distinctions. Anthropic’s comparison table states that Skills offer “Procedural knowledge”, while MCP offers “Tool connectivity”2. Their advice is: “Use both together: MCP for connectivity, Skills for procedural knowledge”2. A CMU lecture notes that REST APIs and MCP share “Names, descriptions, and JSON Schema for structured inputs” but differ in discovery, invocation, and authentication1. The contract itself looks largely consistent across different systems; the surrounding infrastructure is what changes.
Keep one ruler in your pocket. In his October 2 guest lecture, Yan Wang explained that “Every hot noun bundles a lasting problem with packaging from its year”3. Packaging, as he put it, “depreciates”3. This is why you should learn packagings by their components, not by their brand names.
Check yourselfA teammate suggests that moving your tool to MCP means the model now understands it better. Which of the three layers did that move actually change?
Mostly the implementation and how the contract is delivered. The model still reads a name, a description and a JSON Schema, the parts REST and MCP share1. Same description, same understanding.
Section 4.2
Function: defined in the request, run by your code
We start small. You write a function in your program. Each API request carries its contract: a name, a description, and a JSON Schema for its parameters. When the model decides the function would help, it replies with a structured call instead of prose. Google’s documentation explains this division of labor: “The model doesn’t execute the function itself.”5. Your code runs the function and sends the result back for the model’s next turn5.
OpenAI launched this feature on June 13, 20236. Anthropic adds one distinction: client tools run in your application, while server tools like web_search run on Anthropic’s infrastructure7.
Filling in the row:
- Contract: You write it, and it travels inside every request.
- Implementation: This is your code, in your process.
- Knowledge: This includes whatever you put in the description and the system prompt.
- Existence: The model sees every function you list, on every request.
This solves the format problem: arguments arrive as JSON that matches a schema, not as prose you need to parse.
What this approach does not solve becomes clear as you scale up. OpenAI notes that “callable function definitions count against the model’s context limit and are billed as input tokens”4. Its guide suggests “fewer than 20 functions available at the start of a turn at any one time, though this is just a soft suggestion”4. Also, the definitions live in your request code. This means another team’s agent cannot use them without copying your code.
Check yourselfSuppose you have six small functions used by one agent in one application. Which of the problems above do you actually have?
Probably none. Six definitions are well under OpenAI’s soft suggestion of fewer than 204, and with one agent there is nobody to share with.
Section 4.3
CLI plus instructions: one shell, many commands
Now the opposite extreme: give the model one general tool, a shell, and let it run command-line programs it learned in training. mini-swe-agent executes every action with subprocess.run and describes itself as “Just some 100 lines of python for the agent class”9. Yan Wang’s summary: “Shell-native agents read –help and drive the same CLIs you use”3.
The Claude Code team asked the question plainly: “Do you give it one general-purpose tool like bash or code execution? Or fifty specialized tools, one for each use case?”10. They replaced a pre-built code index with a Grep tool so Claude could “search for files and build context itself”10. As of April 2026 it had about 20 tools, and “The bar to add a new tool is high, because this gives the model one more option to think about.”10.
The instructions for these agents are in plain files. Claude Code reads CLAUDE.md “at the start of every conversation”8. Codex reads AGENTS.md files at several levels, and “If there’s a more specific file closer to your current directory, that guidance wins.”11.
Filling in the row:
- Contract: This is the command’s
--helptext and what the model remembers from training. - Implementation: This is an existing program, launched through the shell.
- Knowledge: This comes from the instruction file.
- Existence: The instruction file names the commands, or training already provided this information.
This approach solves integration. The model already knows git, gh, and curl. One tool can represent hundreds of others.
However, it does not solve control. A command line has no schema, so nothing validates the arguments the way a schema would; only a hook or a permission rule can inspect the command before it runs. The shell also holds whatever the command needs. CMU’s slide on calling APIs with curl states it clearly: “Direct REST access is simple, but the agent’s shell receives the API credential.”1. The instruction file cannot close this gap, because Claude Code’s documentation calls CLAUDE.md instructions “advisory”8. Hooks, in contrast, “are deterministic and guarantee the action happens”8. Some harnesses leave containment entirely to you. Pi’s README says it “does not include a built-in permission system for restricting filesystem, process, network, or credential access”12. This is why Sierra’s fix was structural. A read-only, repository-scoped token limits the damage, no matter what the agent types13.
Practitioners still debate this trade-off. They praise CLIs as “precision instruments” or respond that “Authorization, in my opinion, is the big problem you need MCP for”14. These are opinions based on experience, not measurements.
Check yourselfYou give an agent a shell and an instruction file that says “never force-push”. What actually prevents the command from running?
Nothing in the instructions prevents it; they are advisory8. A hook, a permission rule, or a credential that cannot force-push is what makes it impossible.
Section 4.4
Skills: a folder of knowledge, loaded in stages
A function gives an agent an ability. A skill gives it know-how. The Agent Skills specification defines a skill as “a directory containing, at minimum, a SKILL.md file”, with optional scripts/, references/, and assets/ folders15. The file starts with metadata, a name, and a description, followed by plain-language instructions15.
The trick is how the agent reads it. The specification calls this progressive disclosure: “Agents load skills progressively, pulling in more detail only as a task calls for it”15. There are three levels15:
- Metadata, about 100 tokens. Every installed skill’s name and description load at startup.
- Instructions, under 5,000 tokens recommended. The full SKILL.md body loads when the skill is activated.
- Resources, as needed. Other files load only when required.
Anthropic describes these same levels2. In Codex, the starting list of skills “uses at most 2% of the model’s context window, or 8,000 characters when the context window is unknown”16. Because the agent picks a skill by matching the task against descriptions, OpenAI asks for “concise descriptions with clear scope and boundaries”16.
The mechanism is small. The Hermes agent implements it as two tools: skills_list for names and descriptions, and skill_view for full content17. CMU’s first assignment has students build the same thing with an invoke_skill tool18.
Scripts are where a skill borrows capability. Anthropic’s PDF skill ships a script that extracts form fields, which Claude can run “without loading either the script or the PDF into context”19.
Filling in the row:
- Contract: two lines, the name and the description.
- Implementation: optional scripts; otherwise the tools the agent already has.
- Knowledge: the SKILL.md body and its files. This is the point of the packaging.
- Existence: the name and description sit in context from the start.
A skill does not enforce anything. The specification checks the format of the metadata, not whether the instructions are correct; even its allowed-tools field is marked “(Experimental)”15. And because a skill can carry scripts, Anthropic warns that “malicious skills may introduce vulnerabilities in the environment where they’re used”19.
Section 4.5
Skills: do they help, and who writes them?
Does adding a skill actually improve an agent? SkillsBench ran 87 tasks under 18 model–harness configurations, with and without curated skills20: “Curated Skills raise the average pass rate from 33.9% to 50.5% (+16.6 percentage points; 25.5% normalized gain), with configuration-level gains ranging from +4.1 to +25.7 pp.”22. It also found that “Focused Skills with at most three modules outperform larger or exhaustive bundles”22. The authors note their own limits. Adding a skill provides context “so observed gains could partly reflect ‘more context’ rather than procedural structure”22. Their tasks are terminal-based, so the results might not transfer to agents using a graphical user interface (GUI) or to long workflows22.
The average can hide losses. CMU’s slide on the same benchmark shows “Skills still hurt on 13 of 87 tasks.”20. Their explanation is that “A skill can displace a better default strategy.”20. A second paper measured each skill’s contribution by randomly masking skills and found that “individual skills routinely help on some task types while hurting on others”21. It also reports a null result: GPT-5.1 on τ-bench scored 62.6% with and without a skill library that had been curated on a different benchmark, AppWorld, which the authors read as a limit set by the model’s “baseline competence on the target domain”21.
Who should write skills? CMU outlines two pathways20. People can write skills based on their existing expertise; the main challenge here is “expert time to write and maintain”20. Agents can learn skills from their own experiences, which shifts the challenge to judging outcomes, verifying skills, and curating the library20.
People who write skills by hand agree on keeping them short and concrete. Yan Wang’s recipe has three parts: success criteria instead of a step-by-step procedure, the specific pitfalls the model encountered, and deterministic tools23. On pitfalls, he is strict: “Only record mistakes AI actually made.”23. Garry Tan’s test is: “If a smart intern could follow it, an agent can run it.”24. OpenAI found the cost of skipping this discipline: with many long skill descriptions installed, “Codex starts shortening their descriptions to fit”, so the model sees less of each description and has a harder time picking the right skill25.
Agents can also write their own skills. ASI induces skills as programs and verifies them by running them. On the WebArena web-browsing benchmark, with a Claude model, it reached a 40.4% success rate, against 32.7% for a static agent and 36.3% for a text-skill version: relative gains of 23.5% and 11.3%26. The catch is over-specialization. PolySkill tested ASI and SkillWeaver on unseen websites and found skill reuse “less than 9% for ASI and less than 3% for SkillWeaver”27. This line of research continues through workflow memory, code-skill libraries, learning from experience, and older program-library learners28,29,30,31,32,33,34.
Check yourselfYour team’s skill raised the average success rate on your evaluation set. Is it safe to enable it for every task?
Section 4.6
MCP: host, client, server
Anthropic introduced the Model Context Protocol on November 25, 2024, with a one-line diagnosis: “Every new data source requires its own custom implementation, making truly connected systems difficult to scale.”37. MCP separates the program that offers tools from the application that uses them, and standardizes the conversation between them.
MCP defines three roles. The host is “The AI application that coordinates and manages one or multiple MCP clients”36. A client is “A component that maintains a connection to an MCP server”36. A server is “A program that provides context to MCP clients”36. The host creates “one MCP client for each MCP server”36. The messages exchanged are JSON-RPC 2.035, which is a “stateless, light-weight remote procedure call (RPC) protocol”38.
A server offers resources (context and data), prompts (templated messages) and tools (“Functions for the AI model to execute”)35. Tools are meant to be “model-controlled”: the model discovers and invokes them based on the task39. The client discovers them at run time with tools/list and invokes one with tools/call1. Since 2025-06-18 a server can also ask the user for more information, which the specification calls elicitation40.
MCP spread quickly. OpenAI’s Agents SDK added support for MCP on March 26, 202541. Google’s Agent Development Kit listed MCP tools at its launch on April 9, 202542. Microsoft announced “broad first-party support” on May 19, 202543.
Filling in the row:
- Contract: This is written by the server’s author and sent to the host at run time.
- Implementation: This is the server process itself, which can be local or remote.
- Knowledge: This includes the tool descriptions and any instructions the server provides44.
- Existence:
tools/list.
Now what MCP leaves out. The overview states “it does not dictate how AI applications use LLMs or manage the provided context”36. The specification acknowledges “MCP itself cannot enforce these security principles at the protocol level” and asks implementers to build consent and authorization flows into their applications35. The host decides whether a call actually runs. CMU puts this in perspective: “MCP is an alternative agent-facing interface—not a requirement for calling REST APIs.”1.
Check yourselfWhich of these does the MCP specification decide: (a) how the host discovers what tools a server offers, (b) whether a specific call should run, (c) how much of a tool’s output goes into the model’s context?
Section 4.7
MCP: transports, state and twenty months of change
A transport moves messages. The specification’s transport overview defines two: stdio “newline-delimited messages over the standard streams of a client-launched subprocess” and Streamable HTTP “each message is an HTTP POST to a single MCP endpoint”47. A transport “does not define what the messages mean”47. The core protocol defines the message meaning.
The transport and session rules changed often:
- 2024-11-05. Two transports: stdio and “HTTP with Server-Sent Events (SSE)”48.
- 2025-03-26. OAuth 2.1 authorization is added; Streamable HTTP replaces HTTP+SSE; JSON-RPC batching and tool annotations are added49.
- 2025-06-18. Batching is removed; structured tool output, OAuth resource servers, and elicitation are added40.
- 2025-11-25. Experimental tasks and OAuth Client ID Metadata Documents are added50.
- 2026-07-28. The protocol-level session and the initialize handshake are removed46.
The last change was the biggest. Earlier revisions opened a connection-scoped session with an initialize handshake. This meant a server had to remember each client47. The 2026 release notes explain the benefits of removing it: “Any request can now land on any server instance behind a plain round-robin load balancer without needing shared storage.”45. Cloudflare, which hosts MCP servers, said they “can now run in just a Worker”51.
If a server still needs state across calls, it must make that state explicit: “mint an explicit handle from a tool and have the model pass it back as an argument”45. This is a tool-design lesson, not an MCP feature. It applies to a plain function too.
One 2026 change addresses the oldest question in this book: whether a call actually ran. A broken response stream now “loses the in-flight request; clients MUST re-issue it as a new request with a new request ID”46. The client still does not know if the lost request completed its work.
The Python SDK’s v1.x line “is in maintenance mode and will only receive security fixes”52. The specification now promises “a minimum twelve-month deprecation window” for features it removes46.
Read the five change lists side by side. Notice what none of them removes: tools as named operations, JSON Schema inputs, listing tools, and calling them. That stable core is worth learning in depth. Look up the transport details only when you need them.
Check yourselfYou are designing a shopping-cart tool server for the 2026-07-28 revision. Where does the cart’s state live between calls?
Section 4.8
MCP authorization answers “who are you”
A remote MCP server needs to know who is calling. The answer to this question evolved over four revisions.
- 2025-03-26. Authorization was optional54. HTTP implementations should follow an OAuth 2.1 flow54. Stdio servers should “retrieve credentials from the environment”54.
- 2025-06-18. A protected server became “an OAuth 2.1 resource server”53. It must “only accept tokens specifically intended for themselves”53. It “MUST NOT pass through the token it received from the MCP client” to an upstream API53.
- 2025-11-25. Client ID Metadata Documents became the recommended way for a client to register50,55.
- 2026-07-28. Dynamic Client Registration, where a client registers itself on the fly, was deprecated and kept only for backwards compatibility56. Clients now check which authorization server issued a token, so a malicious one cannot pass off a code from an honest one (a “mix-up attack”)57,58.
All of this answers one question: is this client who it claims to be, and is this token meant for this server? Servers can also request narrow scopes “following the principle of least privilege”57. What it does not answer is a different question: should this call, with these arguments, run right now? A valid token does not tell you that sending this email to this address is a good idea. That decision belongs to the host’s permission system and to the server’s own code, which the tools specification says must “Implement proper access controls”39.
The most useful pattern here is one CMU teaches with FastMCP. The harness authenticates to the MCP server with one key. The server calls the upstream API with another key. CMU calls this credential brokering: “the server accepts one credential and uses a different credential upstream. The model sees neither secret.”1. Compare this to the CLI section, where the shell holds the API key itself1. FastMCP supports both ends: token verification on the server59 and bearer tokens on the client60.
Companies can add one more layer: an enterprise-managed authorization extension lets “the organization’s IT or security team” manage access to MCP servers in one place61.
Check yourselfYour MCP server forwards the user’s token straight to the GitHub API because it is convenient. Which rule does that break? What is the safer design?
Section 4.9
MCP annotations, the registry and who governs it
MCP has three features that sound like safety controls. None of them actually are.
Annotations. Since 2025-03-26 a tool can carry annotations describing “whether it is read-only or destructive”49. The maintainers explain four hints, readOnlyHint, destructiveHint, idempotentHint and openWorldHint, with pessimistic defaults: a tool with no annotations is treated as possibly destructive64. The catch is in the word hint. The specification says “clients MUST consider tool annotations to be untrusted unless they come from trusted servers”62. The maintainers put it plainly: “A server can claim readOnlyHint: true and delete your files anyway.”64. A guarantee against data leaving the machine is “a job for network controls or sandboxing, not a boolean hint”64.
Hosts still use annotations. Codex, for example, requires approval for destructive MCP calls “when the tool advertises a destructive annotation (unless the tool advertises a read annotation, which takes priority)”65. ChatGPT’s developer mode states “We respect the readOnlyHint tool annotation”66. This approach works if you trust the servers. However, if you do not trust a server, a false read-only hint could disable your prompt for confirmation.
The registry. The official MCP Registry is “the official centralized metadata repository for publicly accessible MCP servers”63. It is currently in preview63. This registry hosts metadata that points to packages on npm, PyPI, or Docker Hub. It leaves the curation of these packages to downstream marketplaces63. Its moderation process involves format validation and manual takedowns for spam or malicious servers63. A listing in the registry simply means someone published metadata that passed format checks. It does not mean anyone has reviewed the server’s actual behavior.
Governance. Microsoft and GitHub joined the MCP Steering Committee in May 202543. On December 9, 2025, Anthropic donated MCP to the Agentic AI Foundation, which is a directed fund under the Linux Foundation67. The announcement clarifies that “For MCP little changes”: the same maintainers will continue to make decisions through the specification’s public proposal process (SEPs)67. Neither of these facts tells you anything about the trustworthiness of a specific server.
Check yourselfImagine a server in the registry advertises readOnlyHint: true on a tool named cleanup_workspace. Your host skips confirmation for tools marked as read-only. What should you do in this situation?
Section 4.10
REST and OpenAPI next to MCP
If the service you want to give an agent already has a web API, you may already have most of a contract. The standard description is OpenAPI, which “defines a standard, programming language-agnostic interface description for HTTP APIs”69. Its purpose is to let people and programs discover a service’s capabilities “without requiring access to source code”69. Each operation can carry an operationId, a unique name that tools and libraries may use to identify it, and the document declares security schemes such as API keys and OAuth270. You rarely write it by hand: “FastAPI generates a ‘schema’ with all your API using the OpenAPI standard”71.
This looks like an MCP tool list, and the overlap is real. A comparison from CMU starts with the shared elements—names, descriptions, and JSON Schema—then lists the differences1:
| REST with OpenAPI | MCP | |
|---|---|---|
| Discovery | Fetch an OpenAPI document | Call tools/list at runtime |
| Invocation | HTTP verb, path and parameters | tools/call over an MCP transport |
| Authentication | Client authenticates to the API | Client authenticates to MCP; upstream auth is separate |
CMU’s summary: “OpenAPI describes a web API; MCP standardizes how an AI host discovers and invokes capabilities.”1.
So why not convert one into the other? You can. FastMCP “can automatically generate an MCP server from any OpenAPI specification”68. By default it “converts every endpoint in your OpenAPI specification into an MCP Tool”68. Its own documentation then advises against doing that for real use: “in practice LLMs achieve significantly better performance with well-designed and curated MCP servers than with auto-converted OpenAPI servers”68. FastMCP gives no benchmark for “significantly”68. The reasoning still holds: an API is shaped for programmers who read documentation once, while an agent’s tools are shaped for a model that chooses among them on every turn. Use the converter to bootstrap, then cut and rename.
Check yourselfImagine your company’s API has 140 endpoints and a clean OpenAPI document. A teammate suggests exposing all 140 of these to the agent using FastMCP’s converter. What would be your first edit?
Section 4.11
Code execution: let the model write the glue
Imagine an agent that checks expenses for 20 employees. Anthropic’s documentation describes two ways to do this. With direct calls, “the traditional approach requires 20 separate model round-trips, pulling thousands of expense line items into the context along the way”73. With programmatic tool calling, “a single script runs all 20 lookups, filters the results, and returns only the employees who exceeded their limits”73.
In this setup, the model gets one tool that runs code. The other tools become functions inside a sandbox. In Cloudflare’s Code Mode, “our agent is presented with just one tool, which simply executes some TypeScript code”74. The sandbox’s “only access to the outside world is through the TypeScript APIs representing its connected MCP servers”74. Cloudflare argues that tool-call tokens are “things LLMs have never seen in the wild”, while ordinary code is everywhere74.
Filling in the row:
- Contract: These are function signatures inside the sandbox.
- Implementation: These are the real tools, called back from the sandbox.
- Knowledge: This is the program the model writes for the task.
- Existence: The agent loads the tool definitions it needs on demand, rather than loading all of them upfront75.
The numbers are real but narrow, so keep their conditions attached. Anthropic’s code execution with MCP reports one example where it dropped “from 150,000 tokens to 2,000 tokens”75; the post does not name a model or report accuracy. On the BrowseComp and DeepSearchQA search benchmarks, adding Anthropic’s programmatic tool calling on top of basic search tools “improved performance by an average of 11% while using 24% fewer input tokens”73; the page does not name the model. Its launch post reports usage falling “from 43,588 to 27,297 tokens, a 37% reduction on complex research tasks”76, but it names neither the tasks nor the model. OpenAI runs each program “in a fresh, isolated V8 runtime” without direct network or filesystem access72. CMU’s first assignment builds the same idea as a run_python tool18.
This approach does not solve the sandbox itself. Running agent-written code “requires a secure execution environment with appropriate sandboxing, resource limits, and monitoring”75. CMU lists these controls: “Use sandboxing, resource limits, permissions, and audit logs.”1. Vendors also draw a line at write operations. For “Writes or approval-sensitive actions”, OpenAI’s decision table says: “Use direct tool calling by default to preserve a clear authorization boundary.”72. Anthropic’s equivalent setting comes with a bold warning: “Do not rely on allowed_callers as a security boundary.”73.
In Code Mode, the sandbox reaches each server through a binding; every call on it goes to the agent supervisor, which holds the access tokens and adds them to the request74. That is why “the AI cannot possibly write code that leaks any keys”74. This is credential brokering again.
Check yourselfAn agent needs to search 30 product catalogs, compare prices, and then place one order. Which of these steps should be part of a program, and which should remain direct calls?
The 30 searches and the comparison fit well within a program. Their intermediate results are large and do not require judgment. The order is a write operation, and OpenAI’s guidance keeps writes as direct calls to maintain the authorization boundary72.
Section 4.12
Sidebar: where hosts plug these in
Each host decides how MCP servers are configured, how many tools it will take, and when a call needs your approval. The defaults differ by host.
| Host | What the docs say |
|---|---|
| Claude Code | “Verify you trust each server before connecting it”; tool search defers definitions79 |
| Cursor | Configured in mcp.json; “Cursor asks for approval before using MCP tools by default”77 |
| VS Code | At most 128 tools enabled per request80 |
| Gemini CLI | A trusted server “bypasses all confirmation dialogs”78 |
| Windsurf Cascade (legacy agent) | A limit of 100 tools; allowlisting one server blocks all others for the team81 |
| Codex and ChatGPT | One shared configuration in config.toml44 |
Consider another example: OpenAI’s Responses API MCP tool “defaults to requiring approvals of each MCP tool call”82. Its own example of deferred loading sets "require_approval": "never"82. A default is only effective if people maintain it.
Check yourselfSuppose you connect the same MCP server to Cursor and to Gemini CLI. You mark this server as trusted in Gemini CLI. Will both hosts now ask for your approval in the same situations?
Section 4.13
Sidebar: from plugins to apps
The names in this chapter are young. On March 23, 2023, OpenAI launched ChatGPT plugins: you built an API, described it with an OpenAPI specification, and added a manifest file84. The same post reported that red teamers found ways for plugins “to perform sophisticated prompt injection, send fraudulent and spam emails, bypass safety restrictions”84. In October 2023, Semantic Kernel renamed its skills to plugins83. There, a skill had meant a function “called by the same process that’s running your kernel”83. In November 2023, GPTs gained actions that could reuse an existing plugin manifest85. In October 2025, OpenAI released the Apps SDK, “an open standard built on the Model Context Protocol (MCP)”86.
We can learn two things here. First, read definitions, not just labels. The word ‘skill’ has had two different meanings. Second, the risks were identified on day one, more than a year before MCP existed37,84.
Check yourselfA 2023 article suggests adding a skill to your agent. What should you verify before using that advice today?
Section 4.14
The judgment: what does this packaging add over a local function?
This chapter focuses on one key judgment: cost. Every packaging method beyond a plain function adds something you need to run, secure, and keep current. So, you must name what each method adds that a local function would not provide.
- CLI plus instructions adds zero integration for tools the model already knows. This costs you the schema, and the shell holds the credential.
- A skill adds reusable know-how that loads only when needed. This costs text the model may ignore, and it can hurt performance on some tasks.
- An MCP server adds one server that many hosts can discover and call, and it provides a clean place to broker credentials. This costs another process and a specification that has had five revisions in twenty months.
- Code execution adds fewer tokens and round trips for many calls. This costs a sandbox you must build and watch.
Now apply it. Imagine your team builds a tool server for one agent with three tools: searching the course catalog, reading a syllabus, and posting a question. If one agent in one harness is the only consumer, a local function gives you the same contract with less to run. CMU states it directly: MCP is “not a requirement for calling REST APIs”1. Now, change one fact. Five teams’ agents across three different hosts need these same tools, and the posting tool requires a key no agent should hold. In this scenario, MCP adds real benefits: one server every host can discover, and a broker that keeps the upstream key away from the model1.
Sierra chose gh over GitHub’s MCP server because the agents already knew the command13. The authors of FastMCP advise you to curate a server rather than mirror an API68. Yan Wang’s default approach is a sequence, not a winner: “Start with a CLI and an instruction file; add MCP when distribution requires it”3.
Now run the ruler. Yan Wang identifies MCP’s lasting problem as “Giving agents clear, safe interfaces and deciding what plain code should handle”3. He names its packaging as “Routing every tool definition and result through the context window, MCP-first”3. If models were 10 times better, the lasting problem would still matter: someone still decides what an agent may touch and which work belongs in plain code. Much of the packaging would matter less. However, the cost of switching would not disappear. The 2026-07-28 revision removed sessions and the handshake46, and a partner quoted in the release said “The biggest changes are breaking ones”45. Whatever you choose, you will pay to move off it later.
Check yourselfA single internal agent needs to read your team’s issue tracker. The tracker has a well-known CLI and a third-party MCP server. Which do you start with, and what would change your mind?
Before you go on
Close the book
- Draw the five-by-four table from memory. For each packaging type, show where the contract, the implementation, and the knowledge live. Explain how the model learns that the tool exists.
- Explain to a classmate the difference between this client may talk to this server and this call should run now. Which question does MCP authorization answer? Who answers the other?
- Pick a tool you have used. Name its packaging. What is one thing it adds over a local function? What is one thing it costs?
Chapter four · quiz
Test yourself
Most questions have more than one right answer, so select every option that is true. Check each question, then open “Answer and why” for the reasoning.
Sources
- Tool Use for Language Model Agents (Lecture 2 slides). CMU LTI / Graham Neubig. www.cmu-agents.com/slides/lecture-02-tool-use.pdf ↗
- Skills explained: How Skills compares to prompts, Projects, MCP, and subagents. Anthropic (Claude blog). claude.com/blog/skills-explained ↗
- What Gets You Hired, What Gets You Promoted, and What AI Changed. Yan Wang guest deck. ai-builders.com/resources/w4995 ↗
- OpenAI Function Calling Guide. OpenAI. developers.openai.com/api/docs/guides/function-calling ↗
- Function calling with the Gemini API - Interactions API | Google AI for Developers. Google. ai.google.dev/gemini-api/docs/function-calling ↗
- Function calling and other API updates. OpenAI. openai.com/index/function-calling-and-other-api-updates ↗
- Tool use with Claude - Claude Platform Docs. Anthropic. platform.claude.com/docs/en/agents-and-tools/tool-use/overview ↗
- Anthropic. "Claude Code: Best Practices for Agentic Coding." (2025).. www.anthropic.com/engineering/claude-code-best-practices ↗
- Mini-SWE-Agent. github.com/swe-agent/mini-swe-agent ↗
- Seeing like an agent. Anthropic (Thariq Shihipar). claude.com/blog/seeing-like-an-agent ↗
- Best practices (Codex). OpenAI. learn.chatgpt.com/guides/best-practices ↗
- Pi. github.com/badlogic/pi-mono ↗
- Building Sierra's MCP Gateway: An engineering iceberg. Sierra (Mihai Parparita). sierra.ai/blog/building-sierras-mcp-gateway-an-engineering-iceberg ↗
- When does MCP make sense vs CLI?. Hacker News. news.ycombinator.com/item?id=47208398 ↗
- Agent Skills specification. agentskills.io. agentskills.io/specification ↗
- Build skills. OpenAI. learn.chatgpt.com/docs/build-skills ↗
- HermesAgent: skills\_tool.py. github.com/NousResearch/hermes-agent/blob/main/tools/skills_tool.py ↗
- CMU 11-768 Assignment 1: Build an Agent Harness. Weiwei Sun, Saujas Vaduguru et al.. github.com/cmu-agents/assignment-1/blob/main/ASSIGNMENT.md ↗
- Equipping agents for the real world with Agent Skills. Anthropic. www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills ↗
- Memory and Skills (Lecture 4 slides). CMU / Daniel Fried. www.cmu-agents.com/slides/lecture-04-memory-and-skills.pdf ↗
- Not All Skills Help. arxiv.org/abs/2606.15390 ↗
- SkillsBench. arxiv.org/abs/2602.12670 ↗
- Write the Skill Before You Execute. Yan Wang. yage.ai/skill-first-en.html ↗
- Garry Tan: Own Your Intelligence. Y Combinator. www.ycombinator.com/library/WX-garry-tan-own-your-intelligence ↗
- Rethinking skills and prompts for GPT-6 Astra. OpenAI (Eric Provencher). developers.openai.com/blog/rethinking-skills-and-prompts-for-gpt-6-astra ↗
- Agent Skill Induction (ASI). arxiv.org/abs/2504.06821 ↗
- PolySkill. arxiv.org/abs/2510.15863 ↗
- Agent Workflow Memory (AWM). arxiv.org/abs/2409.07429 ↗
- Voyager. arxiv.org/abs/2305.16291 ↗
- TroVE. arxiv.org/abs/2401.12869 ↗
- Reflexion. arxiv.org/abs/2303.11366 ↗
- ExpeL. arxiv.org/abs/2308.10144 ↗
- DreamCoder. arxiv.org/abs/2006.08381 ↗
- LILO. arxiv.org/abs/2310.19791 ↗
- Model Context Protocol Specification. The Linux Foundation (2025).. modelcontextprotocol.io/specification/2025-06-18 ↗
- Architecture overview, MCP docs (round-1 source, B7/B14 URL; page version 2026-07-28). modelcontextprotocol.io (assigned reading; now serves the 2026-07-28 docs). modelcontextprotocol.io/docs/learn/architecture ↗
- Introducing the Model Context Protocol. Anthropic. www.anthropic.com/news/model-context-protocol ↗
- JSON-RPC 2.0 Specification. JSON-RPC Working Group. www.jsonrpc.org/specification ↗
- MCP Tools Specification. modelcontextprotocol.io/specification/draft/server/tools ↗
- Key Changes (2025-06-18). modelcontextprotocol.io. modelcontextprotocol.io/specification/2025-06-18/changelog ↗
- Release v0.0.7 · openai/openai-agents-python. OpenAI (GitHub release). github.com/openai/openai-agents-python/releases/tag/v0.0.7 ↗
- Agent Development Kit: Making it easy to build multi-agent applications. Google for Developers Blog. developers.googleblog.com/en/agent-development-kit-easy-to-build-multi-agent-applications ↗
- Microsoft Build 2025: The age of AI agents and building the open agentic web. Microsoft (Official Microsoft Blog). blogs.microsoft.com/blog/2025/05/19/microsoft-build-2025-the-age-of-ai-agents-and-building-the-open-agentic-web ↗
- Model Context Protocol | ChatGPT Learn (Codex; requested https://developers.openai.com/codex/mcp, redirected). OpenAI. learn.chatgpt.com/docs/extend/mcp?surface=cli ↗
- MCP 2026-07-28 Specification Release. MCP Blog (D. Soria Parra, D. Delimarsky, Lead Maintainers). blog.modelcontextprotocol.io/posts/2026-07-28 ↗
- MCP specification 2026-07-28: Key Changes. Model Context Protocol. modelcontextprotocol.io/specification/2026-07-28/changelog ↗
- MCP Transports Specification. modelcontextprotocol.io/specification/draft/basic/transports ↗
- Specification (revision 2024-11-05), Transports. Model Context Protocol. modelcontextprotocol.io/specification/2024-11-05/basic/transports ↗
- Key Changes (2025-03-26). modelcontextprotocol.io. modelcontextprotocol.io/specification/2025-03-26/changelog ↗
- MCP specification 2025-11-25: Key Changes. Model Context Protocol. modelcontextprotocol.io/specification/2025-11-25/changelog ↗
- The next generation of MCP. Cloudflare (quoting Tom Moor, Linear). blog.cloudflare.com/mcp-v2 ↗
- MCP Python SDK v2.0.0 release. Model Context Protocol (GitHub). github.com/modelcontextprotocol/python-sdk/releases/tag/v2.0.0 ↗
- Authorization (MCP specification, version 2025-06-18). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/specification/2025-06-18/basic/authorization ↗
- Authorization (MCP specification, version 2025-03-26). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/specification/2025-03-26/basic/authorization ↗
- Authorization (MCP specification, version 2025-11-25). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/specification/2025-11-25/basic/authorization ↗
- Client Registration (MCP specification, version 2026-07-28). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration ↗
- Authorization - Overview (MCP specification, version 2026-07-28). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/specification/2026-07-28/basic/authorization ↗
- Authorization Security Considerations (MCP specification, version 2026-07-28). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/specification/2026-07-28/basic/authorization/security-considerations ↗
- FastMCP Token Verification. gofastmcp.com/servers/auth/token-verification ↗
- FastMCP Bearer Client Authentication. gofastmcp.com/clients/auth/bearer ↗
- Enterprise-Managed Authorization (MCP extensions). Model Context Protocol (LF Projects, LLC). modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization ↗
- Tools - Model Context Protocol (spec version 2026-07-28, latest). Model Context Protocol (LF Projects). modelcontextprotocol.io/specification/latest/server/tools ↗
- The MCP Registry - Model Context Protocol. Model Context Protocol. modelcontextprotocol.io/registry/about ↗
- Tool Annotations as Risk Vocabulary: What Hints Can and Can't Do. Model Context Protocol Blog (Ola Hungerford, Sam Morrow/GitHub, Luca Chang/AWS). blog.modelcontextprotocol.io/posts/2026-03-16-tool-annotations ↗
- Agent approvals & security (Codex). OpenAI. developers.openai.com/codex/agent-approvals-security ↗
- ChatGPT Developer mode. OpenAI. platform.openai.com/docs/guides/developer-mode ↗
- MCP joins the Agentic AI Foundation. MCP Blog (D. Soria Parra). blog.modelcontextprotocol.io/posts/2025-12-09-mcp-joins-agentic-ai-foundation ↗
- FastMCP OpenAPI Integration. gofastmcp.com/integrations/openapi ↗
- OpenAPI Specification v3.0.0. OpenAPI Initiative / Linux Foundation. spec.openapis.org/oas/v3.0.0.html ↗
- OpenAPI Specification. spec.openapis.org/oas/latest.html ↗
- FastAPI Generated OpenAPI. fastapi.tiangolo.com/tutorial/first-steps ↗
- Programmatic Tool Calling. OpenAI. developers.openai.com/api/docs/guides/tools-programmatic-tool-calling ↗
- Programmatic tool calling (Claude docs). Anthropic. platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling ↗
- Code Mode. Cloudflare. blog.cloudflare.com/code-mode ↗
- Code execution with MCP. Anthropic. www.anthropic.com/engineering/code-execution-with-mcp ↗
- Introducing advanced tool use on the Claude Developer Platform. Anthropic. www.anthropic.com/engineering/advanced-tool-use ↗
- Model Context Protocol (MCP) | Cursor Docs. Cursor (Anysphere). cursor.com/docs/mcp ↗
- MCP servers with Gemini CLI. Google (Gemini CLI). geminicli.com/docs/tools/mcp-server ↗
- Connect Claude Code to tools via MCP - Claude Code Docs. Anthropic. code.claude.com/docs/en/mcp ↗
- Use tools with agents - Visual Studio Code. Microsoft. code.visualstudio.com/docs/agents/run/tools ↗
- Cascade MCP Integration (Cascade MCP Configuration). Cognition (Windsurf / Devin Desktop). docs.windsurf.com/windsurf/cascade/mcp ↗
- MCP servers. OpenAI. developers.openai.com/api/docs/guides/tools-connectors-mcp ↗
- Skills to plugins: fully embracing the OpenAI plugin spec in Semantic Kernel. Microsoft DevBlogs (Semantic Kernel team). devblogs.microsoft.com/agent-framework/skills-to-plugins-fully-embracing-the-openai-plugin-spec-in-semantic-kernel ↗
- ChatGPT plugins. OpenAI. openai.com/index/chatgpt-plugins ↗
- Introducing GPTs. OpenAI. openai.com/index/introducing-gpts ↗
- Introducing apps in ChatGPT and the new Apps SDK. OpenAI. openai.com/index/introducing-apps-in-chatgpt ↗
- MCP TypeScript SDK v2 Overview. ts.sdk.modelcontextprotocol.io/v2 ↗