{"id":"12-tools-mcp","number":12,"slug":"tools-clis-and-mcp","title":"Tools, CLIs and MCP","short":"Tools, CLIs and MCP","module":"Your toolkit","summary":"An agent is only as capable as its tools, but more tools isn't better: every tool definition costs context. Learn why the shell is the universal adapter, what MCP is for, when a CLI beats an MCP server, and how to design tools that agents actually use well.","voice":"Eric","scenes":[{"template":"title","chapter":"Intro","narration":"An agent is only as capable as its tools. But here's the twist: giving it more tools often makes it worse. This lesson is about choosing tools well.","params":{"kicker":"Lesson 12","module":"Module 3 · Your toolkit","title":"Tools, CLIs and *MCP*","subtitle":"The right tools, not the most tools.","bubble":"Is there a CLI for that?","mood":"happy"},"start":0.5,"dur":11.727,"words":[{"text":"An","s":0.8,"e":0.92},{"text":"agent","s":0.96,"e":1.376},{"text":"is","s":1.44,"e":1.64},{"text":"only","s":1.76,"e":2.08},{"text":"as","s":2.16,"e":2.24},{"text":"capable","s":2.36,"e":2.72},{"text":"as","s":2.8,"e":2.88},{"text":"its","s":2.96,"e":3.12},{"text":"tools.","s":3.2,"e":4.08},{"text":"But","s":4.16,"e":4.24},{"text":"here's","s":4.32,"e":4.48},{"text":"the","s":4.56,"e":4.64},{"text":"twist:","s":4.72,"e":5.6},{"text":"giving","s":5.68,"e":5.84},{"text":"it","s":5.92,"e":6.08},{"text":"more","s":6.2,"e":6.32},{"text":"tools","s":6.4,"e":6.88},{"text":"often","s":7.04,"e":7.2},{"text":"makes","s":7.28,"e":7.44},{"text":"it","s":7.52,"e":7.6},{"text":"worse.","s":7.68,"e":8.64},{"text":"This","s":8.72,"e":8.88},{"text":"lesson","s":8.96,"e":9.36},{"text":"is","s":9.44,"e":9.52},{"text":"about","s":9.68,"e":9.84},{"text":"choosing","s":9.92,"e":10.24},{"text":"tools","s":10.32,"e":10.72},{"text":"well.","s":10.8,"e":11.36}]},{"template":"terminal","chapter":"Bash is the adapter","narration":"Start with the most powerful tool of all: the shell. Models have seen enormous amounts of shell usage, so they're excellent with well-known command line tools. Git, the GitHub CLI, a database client. The Claude Code team even dropped their search index, because, as Boris Cherny puts it, plain glob and grep outperformed everything.","params":{"title":"~/shop · the shell does everything","lines":[{"k":"tool","text":"Bash(gh pr view 482 --comments)","at":"GitHub CLI"},{"k":"tool","text":"Bash(psql $DB -c \"select count(*) from orders where total < 0\")","at":"database"},{"k":"out","text":"count: 3"},{"k":"tool","text":"Bash(git log -S \"applyDiscount\" --oneline | head)","at":"Git"},{"k":"tool","text":"Bash(rg \"applyDiscount\" src/ -n)","at":"grep"},{"k":"agent","text":"Found it: commit 7f0b13d made discounts negative."}]},"start":12.227,"dur":22.579,"words":[{"text":"Start","s":12.527,"e":12.847},{"text":"with","s":12.927,"e":13.007},{"text":"the","s":13.087,"e":13.127},{"text":"most","s":13.167,"e":13.407},{"text":"powerful","s":13.487,"e":13.967},{"text":"tool","s":14.047,"e":14.287},{"text":"of","s":14.367,"e":14.447},{"text":"all:","s":14.567,"e":15.087},{"text":"the","s":15.167,"e":15.247},{"text":"shell.","s":15.327,"e":15.807},{"text":"Models","s":16.367,"e":16.687},{"text":"have","s":16.767,"e":16.847},{"text":"seen","s":16.927,"e":17.167},{"text":"enormous","s":17.327,"e":17.807},{"text":"amounts","s":17.927,"e":18.127},{"text":"of","s":18.167,"e":18.207},{"text":"shell","s":18.287,"e":18.527},{"text":"usage,","s":18.607,"e":19.327},{"text":"so","s":19.407,"e":19.487},{"text":"they're","s":19.527,"e":19.727},{"text":"excellent","s":19.847,"e":20.207},{"text":"with","s":20.287,"e":20.367},{"text":"well-known","s":20.527,"e":20.927},{"text":"command","s":21.087,"e":21.247},{"text":"line","s":21.327,"e":21.487},{"text":"tools.","s":21.567,"e":21.967},{"text":"Git,","s":22.447,"e":23.087},{"text":"the","s":23.127,"e":23.167},{"text":"GitHub","s":23.247,"e":23.647},{"text":"CLI,","s":23.727,"e":24.527},{"text":"a","s":24.567,"e":24.607},{"text":"database","s":24.687,"e":25.087},{"text":"client.","s":25.167,"e":25.567},{"text":"The","s":25.967,"e":26.047},{"text":"Claude","s":26.127,"e":26.367},{"text":"Code","s":26.447,"e":26.607},{"text":"team","s":26.687,"e":26.927},{"text":"even","s":27.007,"e":27.247},{"text":"dropped","s":27.327,"e":27.487},{"text":"their","s":27.567,"e":27.727},{"text":"search","s":27.807,"e":28.047},{"text":"index,","s":28.247,"e":28.527},{"text":"because,","s":28.767,"e":29.167},{"text":"as","s":29.247,"e":29.327},{"text":"Boris","s":29.407,"e":29.727},{"text":"Cherny","s":29.807,"e":30.127},{"text":"puts","s":30.247,"e":30.367},{"text":"it,","s":30.407,"e":30.927},{"text":"plain","s":31.007,"e":31.327},{"text":"glob","s":31.407,"e":31.807},{"text":"and","s":31.887,"e":31.967},{"text":"grep","s":32.047,"e":32.367},{"text":"outperformed","s":32.527,"e":33.327},{"text":"everything.","s":33.407,"e":34.207}]},{"template":"flow","chapter":"What MCP is","narration":"So what's MCP, the Model Context Protocol? Its creators describe it simply: a standard way to give context to any app that uses an LLM, whether that's tools or raw data. You build a server once, and it works with every client that speaks the protocol: Claude Code, Codex, Cursor and many more.","params":{"nodes":[{"label":"Your agent","sub":"Claude Code, Codex, Cursor…","kind":"agent","at":"any app"},{"label":"MCP","sub":"one standard protocol","kind":"tool","at":"standard way"},{"label":"Servers","sub":"GitHub, Sentry, your DB, a browser","kind":"db","at":"build a server"}],"caption":"Build a server once; it works with every client that speaks the protocol.","caption_at":"every client"},"start":34.806,"dur":21.378,"words":[{"text":"So","s":35.106,"e":35.346},{"text":"what's","s":35.586,"e":35.906},{"text":"MCP,","s":35.986,"e":37.026},{"text":"the","s":37.106,"e":37.186},{"text":"Model","s":37.346,"e":37.586},{"text":"Context","s":37.746,"e":38.146},{"text":"Protocol?","s":38.226,"e":38.986},{"text":"Its","s":39.266,"e":39.426},{"text":"creators","s":39.506,"e":39.906},{"text":"describe","s":39.986,"e":40.386},{"text":"it","s":40.466,"e":40.546},{"text":"simply:","s":40.666,"e":41.426},{"text":"a","s":41.506,"e":41.586},{"text":"standard","s":41.786,"e":41.986},{"text":"way","s":42.066,"e":42.226},{"text":"to","s":42.306,"e":42.386},{"text":"give","s":42.466,"e":42.546},{"text":"context","s":42.626,"e":43.186},{"text":"to","s":43.306,"e":43.426},{"text":"any","s":43.546,"e":43.666},{"text":"app","s":43.746,"e":43.986},{"text":"that","s":44.066,"e":44.146},{"text":"uses","s":44.226,"e":44.466},{"text":"an","s":44.546,"e":44.626},{"text":"LLM,","s":44.706,"e":45.506},{"text":"whether","s":45.626,"e":45.746},{"text":"that's","s":45.826,"e":46.066},{"text":"tools","s":46.306,"e":46.546},{"text":"or","s":46.666,"e":46.786},{"text":"raw","s":46.866,"e":47.026},{"text":"data.","s":47.106,"e":47.986},{"text":"You","s":48.066,"e":48.146},{"text":"build","s":48.226,"e":48.306},{"text":"a","s":48.386,"e":48.466},{"text":"server","s":48.666,"e":48.866},{"text":"once,","s":49.066,"e":49.346},{"text":"and","s":49.386,"e":49.426},{"text":"it","s":49.466,"e":49.506},{"text":"works","s":49.586,"e":49.746},{"text":"with","s":49.826,"e":50.066},{"text":"every","s":50.226,"e":50.386},{"text":"client","s":50.546,"e":50.706},{"text":"that","s":50.786,"e":50.866},{"text":"speaks","s":50.946,"e":51.186},{"text":"the","s":51.226,"e":51.266},{"text":"protocol:","s":51.346,"e":52.226},{"text":"Claude","s":52.306,"e":52.546},{"text":"Code,","s":52.626,"e":53.106},{"text":"Codex,","s":53.186,"e":53.906},{"text":"Cursor","s":54.146,"e":54.386},{"text":"and","s":54.546,"e":54.786},{"text":"many","s":54.906,"e":55.026},{"text":"more.","s":55.186,"e":55.586}]},{"template":"context","chapter":"The hidden cost","narration":"But tools aren't free. Every tool's name, description and schema sits in the context window, before you've typed a word. Daisy Hollman from Anthropic gives the math: twenty servers with fifteen tools each, and your context is mostly tool descriptions, with very little room left to work.","params":{"title":"20 MCP servers × 15 tools","cap":"context window","blocks":[{"label":"system","kind":"sys","w":0.06},{"label":"300 tool definitions","kind":"tool","w":0.5,"at":"name, description"},{"label":"your task","kind":"you","w":0.04,"at":"typed a word"},{"label":"room to work","kind":"file","w":0.12,"at":"little room"}],"note":"Research cited by LangChain's Lance Martin: tool use degrades past ~30 tools.","note_at":"math"},"start":56.184,"dur":18.739,"words":[{"text":"But","s":56.484,"e":56.644},{"text":"tools","s":56.724,"e":57.124},{"text":"aren't","s":57.204,"e":57.444},{"text":"free.","s":57.524,"e":58.004},{"text":"Every","s":58.404,"e":58.644},{"text":"tool's","s":58.764,"e":59.044},{"text":"name,","s":59.204,"e":59.524},{"text":"description","s":59.844,"e":60.164},{"text":"and","s":60.244,"e":60.324},{"text":"schema","s":60.404,"e":60.964},{"text":"sits","s":61.044,"e":61.204},{"text":"in","s":61.284,"e":61.364},{"text":"the","s":61.404,"e":61.444},{"text":"context","s":61.524,"e":61.924},{"text":"window,","s":62.004,"e":62.484},{"text":"before","s":62.564,"e":62.964},{"text":"you've","s":63.044,"e":63.204},{"text":"typed","s":63.324,"e":63.444},{"text":"a","s":63.484,"e":63.524},{"text":"word.","s":63.604,"e":64.204},{"text":"Daisy","s":64.484,"e":64.804},{"text":"Hollman","s":64.884,"e":65.284},{"text":"from","s":65.364,"e":65.444},{"text":"Anthropic","s":65.564,"e":66.084},{"text":"gives","s":66.124,"e":66.324},{"text":"the","s":66.364,"e":66.404},{"text":"math:","s":66.484,"e":67.364},{"text":"twenty","s":67.444,"e":67.684},{"text":"servers","s":67.764,"e":68.244},{"text":"with","s":68.364,"e":68.484},{"text":"fifteen","s":68.524,"e":68.964},{"text":"tools","s":69.124,"e":69.284},{"text":"each,","s":69.444,"e":69.924},{"text":"and","s":69.964,"e":70.004},{"text":"your","s":70.084,"e":70.164},{"text":"context","s":70.244,"e":70.724},{"text":"is","s":70.804,"e":70.964},{"text":"mostly","s":71.044,"e":71.364},{"text":"tool","s":71.444,"e":71.604},{"text":"descriptions,","s":71.684,"e":72.404},{"text":"with","s":72.524,"e":72.644},{"text":"very","s":72.724,"e":72.964},{"text":"little","s":73.044,"e":73.204},{"text":"room","s":73.284,"e":73.444},{"text":"left","s":73.524,"e":73.684},{"text":"to","s":73.724,"e":73.764},{"text":"work.","s":73.844,"e":74.324}]},{"template":"stat","chapter":"CLI or MCP?","narration":"That's why many practitioners reach for command line tools first. Cal from the Claude Code team recommends: if there's a well-known, well-documented CLI, use it instead of an MCP server. Kun Chen measured it: for the same GitHub tasks, the GitHub MCP server used about three times the tokens, and more than twice the latency, of the GitHub CLI.","params":{"items":[{"value":"~3×","label":"tokens: GitHub MCP server vs the gh CLI","tone":"bad","at":"three times"},{"value":">2×","label":"latency for the same tasks","tone":"bad","at":"twice"}],"src":"Kun Chen's benchmark, “L8 Principal's Agentic Engineering Workflow”"},"start":74.923,"dur":23.624,"words":[{"text":"That's","s":75.223,"e":75.543},{"text":"why","s":75.623,"e":75.703},{"text":"many","s":75.783,"e":75.943},{"text":"practitioners","s":76.023,"e":76.743},{"text":"reach","s":76.863,"e":76.983},{"text":"for","s":77.063,"e":77.143},{"text":"command","s":77.343,"e":77.543},{"text":"line","s":77.623,"e":77.783},{"text":"tools","s":77.863,"e":78.103},{"text":"first.","s":78.263,"e":78.943},{"text":"Cal","s":79.223,"e":79.543},{"text":"from","s":79.623,"e":79.783},{"text":"the","s":79.823,"e":79.863},{"text":"Claude","s":79.943,"e":80.183},{"text":"Code","s":80.263,"e":80.503},{"text":"team","s":80.583,"e":80.743},{"text":"recommends:","s":80.823,"e":81.383},{"text":"if","s":81.783,"e":81.863},{"text":"there's","s":81.943,"e":82.103},{"text":"a","s":82.183,"e":82.263},{"text":"well-known,","s":82.343,"e":83.063},{"text":"well-documented","s":83.183,"e":83.943},{"text":"CLI,","s":84.023,"e":84.983},{"text":"use","s":85.063,"e":85.223},{"text":"it","s":85.303,"e":85.463},{"text":"instead","s":85.543,"e":85.863},{"text":"of","s":85.903,"e":85.943},{"text":"an","s":85.983,"e":86.023},{"text":"MCP","s":86.103,"e":86.583},{"text":"server.","s":86.663,"e":87.263},{"text":"Kun","s":87.543,"e":87.703},{"text":"Chen","s":87.783,"e":88.023},{"text":"measured","s":88.103,"e":88.423},{"text":"it:","s":88.503,"e":89.063},{"text":"for","s":89.143,"e":89.223},{"text":"the","s":89.303,"e":89.383},{"text":"same","s":89.463,"e":89.623},{"text":"GitHub","s":89.703,"e":90.023},{"text":"tasks,","s":90.103,"e":90.823},{"text":"the","s":90.863,"e":90.903},{"text":"GitHub","s":90.983,"e":91.383},{"text":"MCP","s":91.463,"e":91.943},{"text":"server","s":92.103,"e":92.343},{"text":"used","s":92.503,"e":92.663},{"text":"about","s":92.743,"e":92.903},{"text":"three","s":93.063,"e":93.383},{"text":"times","s":93.463,"e":93.863},{"text":"the","s":93.903,"e":93.943},{"text":"tokens,","s":94.023,"e":94.743},{"text":"and","s":94.783,"e":94.823},{"text":"more","s":94.903,"e":94.983},{"text":"than","s":95.063,"e":95.143},{"text":"twice","s":95.223,"e":95.623},{"text":"the","s":95.663,"e":95.703},{"text":"latency,","s":95.783,"e":96.423},{"text":"of","s":96.463,"e":96.503},{"text":"the","s":96.583,"e":96.623},{"text":"GitHub","s":96.663,"e":97.063},{"text":"CLI.","s":97.143,"e":97.943}]},{"template":"stack","chapter":"The tool ladder","narration":"Will from Anthropic suggests a tool ladder. Start with the built-in tools: read, write, edit, bash. Then add small local scripts for your own agent. Only reach for an MCP server when several clients need the same standardized, governed set of tools. Running to MCP first creates a chaos of overlapping servers.","params":{"title":"The tool ladder","sub":"Climb only as high as you need.","layers":[{"label":"Built-in tools","sub":"read, edit, bash, search","tone":"good","icon":"terminal","at":"built-in"},{"label":"CLIs you already have","sub":"git, gh, psql, docker","tone":"paper","icon":"tool","at":"bash"},{"label":"Local scripts","sub":"small tools for your own agent","tone":"soft","icon":"code","at":"own agent"},{"label":"MCP server","sub":"when many clients need the same tools","tone":"agent","icon":"plug","at":"several clients"}]},"start":98.547,"dur":22.919,"words":[{"text":"Will","s":98.847,"e":99.167},{"text":"from","s":99.247,"e":99.327},{"text":"Anthropic","s":99.407,"e":100.047},{"text":"suggests","s":100.287,"e":100.567},{"text":"a","s":100.607,"e":100.687},{"text":"tool","s":100.767,"e":101.007},{"text":"ladder.","s":101.087,"e":101.487},{"text":"Start","s":102.047,"e":102.287},{"text":"with","s":102.367,"e":102.447},{"text":"the","s":102.487,"e":102.527},{"text":"built-in","s":102.607,"e":102.927},{"text":"tools:","s":103.087,"e":103.807},{"text":"read,","s":103.887,"e":104.447},{"text":"write,","s":104.607,"e":105.087},{"text":"edit,","s":105.247,"e":105.647},{"text":"bash.","s":105.727,"e":106.207},{"text":"Then","s":106.847,"e":107.087},{"text":"add","s":107.327,"e":107.487},{"text":"small","s":107.567,"e":107.887},{"text":"local","s":107.967,"e":108.207},{"text":"scripts","s":108.287,"e":108.687},{"text":"for","s":108.767,"e":108.847},{"text":"your","s":108.927,"e":109.007},{"text":"own","s":109.087,"e":109.167},{"text":"agent.","s":109.247,"e":109.647},{"text":"Only","s":110.127,"e":110.447},{"text":"reach","s":110.567,"e":110.687},{"text":"for","s":110.767,"e":110.847},{"text":"an","s":110.887,"e":110.927},{"text":"MCP","s":111.007,"e":111.487},{"text":"server","s":111.647,"e":111.967},{"text":"when","s":112.047,"e":112.287},{"text":"several","s":112.367,"e":112.607},{"text":"clients","s":112.687,"e":113.087},{"text":"need","s":113.167,"e":113.247},{"text":"the","s":113.327,"e":113.487},{"text":"same","s":113.647,"e":113.807},{"text":"standardized,","s":113.967,"e":114.847},{"text":"governed","s":114.887,"e":115.247},{"text":"set","s":115.327,"e":115.407},{"text":"of","s":115.487,"e":115.567},{"text":"tools.","s":115.647,"e":116.327},{"text":"Running","s":116.607,"e":116.847},{"text":"to","s":116.887,"e":116.927},{"text":"MCP","s":117.007,"e":117.487},{"text":"first","s":117.647,"e":118.047},{"text":"creates","s":118.127,"e":118.447},{"text":"a","s":118.527,"e":118.607},{"text":"chaos","s":118.687,"e":119.167},{"text":"of","s":119.247,"e":119.327},{"text":"overlapping","s":119.407,"e":119.967},{"text":"servers.","s":120.047,"e":120.847}]},{"template":"compare","chapter":"Design tools for agents","narration":"If you do build tools, design them for agents, not like an API for developers. Anthropic's guidance: don't just wrap every endpoint. Consolidate steps that always go together, like a single schedule event tool instead of three. Return names, not opaque IDs. And make error messages tell the agent what to do next.","params":{"left":{"title":"An API wrapper","items":["list_users, list_events, create_event","Returns raw UUIDs and every field","Error: 400 Bad Request"],"at":"wrap every endpoint"},"right":{"title":"A tool for agents","items":["schedule_event(attendees, time)","Returns names and only key fields","Error: “Alice is busy at 3pm; try 4pm”"],"at":"Consolidate"}},"start":121.466,"dur":23.624,"words":[{"text":"If","s":121.766,"e":121.926},{"text":"you","s":122.006,"e":122.166},{"text":"do","s":122.246,"e":122.326},{"text":"build","s":122.406,"e":122.646},{"text":"tools,","s":122.886,"e":123.366},{"text":"design","s":123.446,"e":123.766},{"text":"them","s":123.846,"e":123.926},{"text":"for","s":124.046,"e":124.166},{"text":"agents,","s":124.446,"e":125.046},{"text":"not","s":125.126,"e":125.286},{"text":"like","s":125.366,"e":125.446},{"text":"an","s":125.526,"e":125.606},{"text":"API","s":125.686,"e":126.166},{"text":"for","s":126.246,"e":126.326},{"text":"developers.","s":126.406,"e":127.486},{"text":"Anthropic's","s":127.926,"e":128.566},{"text":"guidance:","s":128.646,"e":129.366},{"text":"don't","s":129.606,"e":129.846},{"text":"just","s":129.926,"e":130.086},{"text":"wrap","s":130.166,"e":130.486},{"text":"every","s":130.566,"e":130.886},{"text":"endpoint.","s":130.966,"e":131.526},{"text":"Consolidate","s":132.006,"e":132.646},{"text":"steps","s":132.726,"e":133.046},{"text":"that","s":133.166,"e":133.286},{"text":"always","s":133.486,"e":133.686},{"text":"go","s":133.766,"e":133.806},{"text":"together,","s":133.846,"e":134.486},{"text":"like","s":134.566,"e":134.726},{"text":"a","s":134.806,"e":134.886},{"text":"single","s":135.006,"e":135.126},{"text":"schedule","s":135.286,"e":135.606},{"text":"event","s":135.686,"e":135.926},{"text":"tool","s":136.006,"e":136.246},{"text":"instead","s":136.326,"e":136.646},{"text":"of","s":136.726,"e":136.806},{"text":"three.","s":136.966,"e":137.446},{"text":"Return","s":137.766,"e":138.166},{"text":"names,","s":138.246,"e":138.886},{"text":"not","s":138.966,"e":139.206},{"text":"opaque","s":139.286,"e":139.686},{"text":"IDs.","s":139.766,"e":140.566},{"text":"And","s":140.806,"e":141.046},{"text":"make","s":141.366,"e":141.526},{"text":"error","s":141.686,"e":141.846},{"text":"messages","s":141.926,"e":142.406},{"text":"tell","s":142.526,"e":142.646},{"text":"the","s":142.726,"e":142.806},{"text":"agent","s":143.006,"e":143.206},{"text":"what","s":143.286,"e":143.446},{"text":"to","s":143.486,"e":143.526},{"text":"do","s":143.606,"e":143.686},{"text":"next.","s":143.766,"e":144.486}]},{"template":"statement","chapter":"Design tools for agents","narration":"Small details matter a lot. When Anthropic tuned their agent for a coding benchmark, it kept making mistakes with relative file paths. They changed the tool to require absolute paths, and the model used it flawlessly. Armin Ronacher's rule: protect your tools against an LLM chaos monkey. There's no such thing as user error.","params":{"text":"Protect your tools against an *LLM chaos monkey*.","sub":"There's no such thing as user error. — Armin Ronacher","art":"tool","tone":"agent","sync":false},"start":145.09,"dur":22.919,"words":[{"text":"Small","s":145.39,"e":145.79},{"text":"details","s":145.87,"e":146.35},{"text":"matter","s":146.51,"e":146.75},{"text":"a","s":146.83,"e":146.91},{"text":"lot.","s":147.07,"e":147.47},{"text":"When","s":148.03,"e":148.11},{"text":"Anthropic","s":148.23,"e":148.67},{"text":"tuned","s":148.75,"e":148.99},{"text":"their","s":149.07,"e":149.15},{"text":"agent","s":149.23,"e":149.55},{"text":"for","s":149.59,"e":149.63},{"text":"a","s":149.71,"e":149.79},{"text":"coding","s":149.87,"e":150.11},{"text":"benchmark,","s":150.19,"e":150.99},{"text":"it","s":151.07,"e":151.15},{"text":"kept","s":151.27,"e":151.39},{"text":"making","s":151.47,"e":151.71},{"text":"mistakes","s":151.87,"e":152.27},{"text":"with","s":152.35,"e":152.43},{"text":"relative","s":152.51,"e":152.91},{"text":"file","s":152.99,"e":153.23},{"text":"paths.","s":153.31,"e":154.07},{"text":"They","s":154.35,"e":154.51},{"text":"changed","s":154.67,"e":154.83},{"text":"the","s":154.91,"e":154.99},{"text":"tool","s":155.11,"e":155.23},{"text":"to","s":155.31,"e":155.39},{"text":"require","s":155.63,"e":155.87},{"text":"absolute","s":156.15,"e":156.43},{"text":"paths,","s":156.51,"e":157.07},{"text":"and","s":157.15,"e":157.23},{"text":"the","s":157.27,"e":157.31},{"text":"model","s":157.39,"e":157.63},{"text":"used","s":157.79,"e":157.95},{"text":"it","s":158.03,"e":158.11},{"text":"flawlessly.","s":158.27,"e":159.43},{"text":"Armin","s":159.95,"e":160.23},{"text":"Ronacher's","s":160.35,"e":160.75},{"text":"rule:","s":160.99,"e":161.75},{"text":"protect","s":161.95,"e":162.03},{"text":"your","s":162.11,"e":162.27},{"text":"tools","s":162.43,"e":162.51},{"text":"against","s":162.83,"e":162.91},{"text":"an","s":162.99,"e":163.07},{"text":"LLM","s":163.15,"e":163.63},{"text":"chaos","s":163.79,"e":164.11},{"text":"monkey.","s":164.43,"e":165.07},{"text":"There's","s":165.15,"e":165.31},{"text":"no","s":165.47,"e":165.63},{"text":"such","s":165.79,"e":165.95},{"text":"thing","s":166.19,"e":166.27},{"text":"as","s":166.43,"e":166.51},{"text":"user","s":166.75,"e":166.83},{"text":"error.","s":167.15,"e":167.39}]},{"template":"terminal","chapter":"Help text for agents","narration":"A neat trick from Simon Willison: write your tool's help output for agents. His browser tool's help text teaches an agent everything it needs. So the prompt can just say: run it with help, then use it to test the page. The agent bootstraps itself.","params":{"title":"~/blog · a tool that teaches itself","lines":[{"k":"you","text":"use `uvx rodney --help`, then test the new page in a real browser","at":"run it with help"},{"k":"tool","text":"Bash(uvx rodney --help)"},{"k":"dim","text":"  (help text written for agents: everything needed to drive a browser)"},{"k":"tool","text":"Bash(uvx rodney … http://localhost:8000/newsletter)","at":"bootstraps"},{"k":"ok","text":"page checked in a real browser"}]},"start":168.009,"dur":16.989,"words":[{"text":"A","s":168.309,"e":168.389},{"text":"neat","s":168.469,"e":168.629},{"text":"trick","s":168.709,"e":168.949},{"text":"from","s":169.029,"e":169.189},{"text":"Simon","s":169.269,"e":169.509},{"text":"Willison:","s":169.589,"e":170.629},{"text":"write","s":170.709,"e":170.949},{"text":"your","s":171.029,"e":171.109},{"text":"tool's","s":171.229,"e":171.429},{"text":"help","s":171.509,"e":171.749},{"text":"output","s":171.949,"e":172.149},{"text":"for","s":172.229,"e":172.309},{"text":"agents.","s":172.389,"e":173.149},{"text":"His","s":173.429,"e":173.589},{"text":"browser","s":173.669,"e":173.989},{"text":"tool's","s":174.069,"e":174.389},{"text":"help","s":174.509,"e":174.629},{"text":"text","s":174.709,"e":175.029},{"text":"teaches","s":175.189,"e":175.509},{"text":"an","s":175.589,"e":175.669},{"text":"agent","s":175.749,"e":176.069},{"text":"everything","s":176.229,"e":176.629},{"text":"it","s":176.709,"e":176.789},{"text":"needs.","s":176.989,"e":177.429},{"text":"So","s":177.669,"e":177.749},{"text":"the","s":177.829,"e":177.869},{"text":"prompt","s":177.909,"e":178.229},{"text":"can","s":178.309,"e":178.389},{"text":"just","s":178.469,"e":178.549},{"text":"say:","s":178.629,"e":178.949},{"text":"run","s":179.429,"e":179.589},{"text":"it","s":179.629,"e":179.669},{"text":"with","s":179.749,"e":179.829},{"text":"help,","s":179.989,"e":180.469},{"text":"then","s":180.589,"e":180.709},{"text":"use","s":180.789,"e":180.949},{"text":"it","s":181.029,"e":181.109},{"text":"to","s":181.149,"e":181.189},{"text":"test","s":181.269,"e":181.429},{"text":"the","s":181.469,"e":181.509},{"text":"page.","s":181.589,"e":182.229},{"text":"The","s":182.469,"e":182.549},{"text":"agent","s":182.629,"e":183.029},{"text":"bootstraps","s":183.109,"e":183.589},{"text":"itself.","s":183.669,"e":184.389}]},{"template":"statement","chapter":"A warning","narration":"One warning before we move on. Simon Willison points out that MCP makes it easy to mix tools from different sources, and some of them read private data while others touch content attackers can influence. That combination is dangerous, and it gets its own lesson later.","params":{"text":"Mixing tools from many sources can quietly create a *security hole*.","sub":"More in lesson 21: the lethal trifecta.","art":"warn","tone":"bad","sync":false},"start":184.998,"dur":17.877,"words":[{"text":"One","s":185.298,"e":185.538},{"text":"warning","s":185.618,"e":185.938},{"text":"before","s":186.098,"e":186.258},{"text":"we","s":186.338,"e":186.418},{"text":"move","s":186.538,"e":186.658},{"text":"on.","s":186.778,"e":187.218},{"text":"Simon","s":187.538,"e":187.858},{"text":"Willison","s":187.938,"e":188.418},{"text":"points","s":188.578,"e":188.738},{"text":"out","s":188.818,"e":188.978},{"text":"that","s":189.098,"e":189.218},{"text":"MCP","s":189.298,"e":189.858},{"text":"makes","s":189.938,"e":190.098},{"text":"it","s":190.178,"e":190.338},{"text":"easy","s":190.418,"e":190.658},{"text":"to","s":190.738,"e":190.818},{"text":"mix","s":190.898,"e":191.058},{"text":"tools","s":191.138,"e":191.458},{"text":"from","s":191.538,"e":191.618},{"text":"different","s":191.698,"e":191.938},{"text":"sources,","s":192.018,"e":192.898},{"text":"and","s":193.018,"e":193.138},{"text":"some","s":193.218,"e":193.298},{"text":"of","s":193.378,"e":193.458},{"text":"them","s":193.538,"e":193.618},{"text":"read","s":193.698,"e":193.938},{"text":"private","s":194.178,"e":194.418},{"text":"data","s":194.498,"e":194.898},{"text":"while","s":195.018,"e":195.138},{"text":"others","s":195.218,"e":195.538},{"text":"touch","s":195.658,"e":195.778},{"text":"content","s":195.858,"e":196.258},{"text":"attackers","s":196.338,"e":196.818},{"text":"can","s":196.898,"e":197.058},{"text":"influence.","s":197.138,"e":198.258},{"text":"That","s":198.378,"e":198.498},{"text":"combination","s":198.818,"e":199.138},{"text":"is","s":199.218,"e":199.458},{"text":"dangerous,","s":199.658,"e":200.338},{"text":"and","s":200.378,"e":200.418},{"text":"it","s":200.498,"e":200.578},{"text":"gets","s":200.658,"e":200.738},{"text":"its","s":200.858,"e":200.978},{"text":"own","s":201.058,"e":201.218},{"text":"lesson","s":201.378,"e":201.538},{"text":"later.","s":201.618,"e":202.258}]},{"template":"quiz","chapter":"Quick check","narration":"Quick check. You want your agent to work with GitHub issues and pull requests. What's the best first step? Tap your answer.","params":{"q":"You want your agent to work with GitHub issues and PRs. Best first step?","options":["Install several GitHub MCP servers to be safe","Make sure the gh CLI is installed and logged in, and mention it in your memory file","Paste GitHub's API docs into every prompt","Build your own MCP server for GitHub"],"answer":1,"explain":"A well-known CLI the model already understands is cheaper in tokens and simpler to run."},"start":202.875,"dur":13.389,"words":[{"text":"Quick","s":203.175,"e":203.335},{"text":"check.","s":203.415,"e":204.015},{"text":"You","s":204.295,"e":204.375},{"text":"want","s":204.455,"e":204.535},{"text":"your","s":204.615,"e":204.695},{"text":"agent","s":204.775,"e":205.095},{"text":"to","s":205.135,"e":205.175},{"text":"work","s":205.255,"e":205.415},{"text":"with","s":205.495,"e":205.575},{"text":"GitHub","s":205.735,"e":206.055},{"text":"issues","s":206.135,"e":206.535},{"text":"and","s":206.575,"e":206.615},{"text":"pull","s":206.775,"e":206.935},{"text":"requests.","s":207.015,"e":207.815},{"text":"What's","s":208.055,"e":208.295},{"text":"the","s":208.335,"e":208.375},{"text":"best","s":208.535,"e":208.775},{"text":"first","s":208.855,"e":209.095},{"text":"step?","s":209.295,"e":209.735},{"text":"Tap","s":209.975,"e":210.215},{"text":"your","s":210.295,"e":210.375},{"text":"answer.","s":210.575,"e":211.015}]},{"template":"exercise","chapter":"Try it","narration":"Audit your agent's toolbox. This prompt finds the useful CLIs you already have, checks your MCP servers, and estimates how much context their definitions cost.","params":{"title":"Try it with your agent","intro":"Audit your toolbox:","prompt":"Check which CLIs that matter for this project are installed and\nauthenticated (git, gh, psql, docker, etc.). Then list the MCP\nservers enabled in this session, roughly how much context their\ntool definitions use, and which ones I could disable for this repo."},"start":216.264,"dur":11.869,"words":[{"text":"Audit","s":216.564,"e":216.964},{"text":"your","s":217.044,"e":217.124},{"text":"agent's","s":217.204,"e":217.604},{"text":"toolbox.","s":217.684,"e":218.404},{"text":"This","s":219.044,"e":219.204},{"text":"prompt","s":219.284,"e":219.524},{"text":"finds","s":219.684,"e":219.964},{"text":"the","s":220.004,"e":220.084},{"text":"useful","s":220.164,"e":220.484},{"text":"CLIs","s":220.564,"e":221.124},{"text":"you","s":221.204,"e":221.284},{"text":"already","s":221.364,"e":221.684},{"text":"have,","s":221.764,"e":222.404},{"text":"checks","s":222.564,"e":222.724},{"text":"your","s":222.764,"e":222.804},{"text":"MCP","s":222.884,"e":223.364},{"text":"servers,","s":223.444,"e":224.164},{"text":"and","s":224.284,"e":224.404},{"text":"estimates","s":224.564,"e":225.044},{"text":"how","s":225.124,"e":225.204},{"text":"much","s":225.284,"e":225.444},{"text":"context","s":225.524,"e":226.084},{"text":"their","s":226.164,"e":226.244},{"text":"definitions","s":226.524,"e":226.804},{"text":"cost.","s":226.884,"e":227.524}]},{"template":"recap","chapter":"Recap","narration":"Recap. The shell is the universal adapter. MCP standardizes connections, but every tool costs context. Prefer well-known CLIs, climb the tool ladder only as far as you need, and design tools for agents. Next: skills, commands and hooks, the way to teach your agent your team's know-how.","params":{"items":["Bash + well-known CLIs go far","MCP: one server, many clients","Every tool definition costs *context*","Built-in → CLI → scripts → MCP"],"next":"Skills, commands and hooks","next_at":"Next"},"start":228.133,"dur":24.182,"words":[{"text":"Recap.","s":228.433,"e":229.073},{"text":"The","s":229.553,"e":229.633},{"text":"shell","s":229.713,"e":230.113},{"text":"is","s":230.193,"e":230.353},{"text":"the","s":230.393,"e":230.433},{"text":"universal","s":230.593,"e":231.073},{"text":"adapter.","s":231.153,"e":231.713},{"text":"MCP","s":232.273,"e":232.833},{"text":"standardizes","s":232.913,"e":233.633},{"text":"connections,","s":233.713,"e":234.513},{"text":"but","s":234.593,"e":234.753},{"text":"every","s":234.833,"e":235.073},{"text":"tool","s":235.153,"e":235.473},{"text":"costs","s":235.633,"e":236.033},{"text":"context.","s":236.113,"e":236.993},{"text":"Prefer","s":237.233,"e":237.633},{"text":"well-known","s":237.713,"e":238.273},{"text":"CLIs,","s":238.353,"e":239.393},{"text":"climb","s":239.473,"e":239.713},{"text":"the","s":239.753,"e":239.793},{"text":"tool","s":239.873,"e":240.033},{"text":"ladder","s":240.113,"e":240.353},{"text":"only","s":240.513,"e":240.833},{"text":"as","s":240.913,"e":240.993},{"text":"far","s":241.073,"e":241.153},{"text":"as","s":241.233,"e":241.313},{"text":"you","s":241.393,"e":241.473},{"text":"need,","s":241.553,"e":242.193},{"text":"and","s":242.273,"e":242.513},{"text":"design","s":242.833,"e":243.233},{"text":"tools","s":243.313,"e":243.713},{"text":"for","s":243.793,"e":243.873},{"text":"agents.","s":243.953,"e":244.953},{"text":"Next:","s":245.473,"e":245.953},{"text":"skills,","s":246.433,"e":246.833},{"text":"commands","s":247.073,"e":247.153},{"text":"and","s":247.233,"e":247.313},{"text":"hooks,","s":247.713,"e":248.193},{"text":"the","s":248.273,"e":248.353},{"text":"way","s":248.433,"e":248.513},{"text":"to","s":248.553,"e":248.593},{"text":"teach","s":248.673,"e":248.913},{"text":"your","s":248.993,"e":249.193},{"text":"agent","s":249.393,"e":249.473},{"text":"your","s":249.633,"e":249.753},{"text":"team's","s":249.873,"e":250.113},{"text":"know-how.","s":250.193,"e":250.753}]}],"total":252.715,"audio":"/audio/12-tools-mcp.mp3"}