[{"data":1,"prerenderedAt":216},["ShallowReactive",2],{"learn-lesson-ai-agent-web-data-mcp-design-tools-an-agent-can-use":3},{"course":4,"lesson":67,"index":182,"outline":183,"prev":214,"next":215},{"slug":5,"order":6,"level":7,"time":8,"card_text":9,"seo":10,"hero":16,"outcomes":26,"who":35,"syllabus":46,"faq":49,"lessonCount":66},"ai-agent-web-data-mcp",2,"Comfortable editing a config file","6 lessons, about 60 minutes","Your agent is confidently wrong about prices because it has never seen one. What MCP is, how to connect a server, how to design tools a model can actually use, and the guardrails you need before you let it loose.",{"title":11,"description":12,"keywords":13,"og_title":14,"og_description":15},"MCP for AI Agents: A Free 6-Lesson Course on Live Web Data","What MCP is, how to connect a server to Claude, how to design tools an agent can use, and how to give an agent live web data without it inventing prices. Free, ungated.","mcp tutorial, model context protocol, ai agent web data, mcp server claude, give agent live data, mcp tools design, agent web scraping","A free course on giving AI agents live web data via MCP","Six written lessons: the protocol, the failure modes, connecting a server, designing usable tools, and the guardrails.",{"badge":17,"title":18,"subtitle":19,"cta_primary":20,"cta_secondary":23},"Course two","Give your AI agent live web data via MCP","Ask an assistant what a product costs today and you will usually get a number. It is often wrong, and it is always wrong in the same way: the model is reconstructing a plausible price from training data rather than looking at a page. This course is about closing that gap properly — what the Model Context Protocol actually is, how to wire a server into a client, how to design tools a model can use without hand-holding, and what to put in place before an agent spends your money.",{"label":21,"url":22},"Start with lesson one","/learn/ai-agent-web-data-mcp/what-is-mcp",{"label":24,"url":25},"See our MCP skill","/skills",{"title":27,"items":28},"What you will be able to do",[29,30,31,32,33,34],"Explain MCP to a colleague in two sentences without using the word \"ecosystem\"","Tell the difference between a model that does not know something and a model that has been given a tool badly","Connect an MCP server to a client and verify that the tools are actually registered","Write a tool description a model picks correctly on the first attempt","Give an agent the ability to fetch a real price from a real page","Put a spend cap, a rate limit and an injection boundary in place before any of this touches production",{"title":36,"for_title":37,"for":38,"not_title":42,"not_for":43},"Who this is for","Written for",[39,40,41],"Developers building on Claude, ChatGPT or an agent framework who need the agent to see the live web","Technical founders evaluating whether MCP is worth adopting","Data teams who already have an API and are deciding whether to expose it to agents","Not written for",[44,45],"Anyone looking for a no-code agent builder — this assumes a config file and a terminal","Readers who want the full specification; this is the working subset, and the spec is linked where it matters",{"title":47,"intro":48},"The six lessons","Lessons one and two are concepts and cost nothing to read. From three onwards you will want a client installed.",{"badge":50,"title":51,"description":52,"items":53},"FAQ","Before you start","The questions that come up in the first ten minutes.",[54,57,60,63],{"title":55,"description":56},"Do I need to know what MCP is already?","No. Lesson one assumes nothing beyond having used an AI assistant. If you already know what a tool call is, skim it and start at lesson two.",{"title":58,"description":59},"Is this Claude-specific?","MCP is an open protocol and the concepts transfer to any client that implements it. The concrete configuration examples use Claude because that is the client most readers will have in front of them, and the differences elsewhere are mostly about where the config file lives.",{"title":61,"description":62},"Do I need a Scrapewise account?","Only for lesson five, which walks through pointing an agent at a real scraper. Everything else works against any MCP server, including ones you write yourself in an afternoon.",{"title":64,"description":65},"Can I just use a web search tool instead?","Sometimes, and lesson two is explicit about when. Search gives an agent a summary of a page; a scraper gives it the specific field from a specific page. For \"what is the general sentiment on X\" search is better. For \"what does this exact URL charge today\" it is not.",6,{"slug":68,"nav_title":69,"title":70,"summary":71,"time":72,"needs_account":73,"seo":74,"blocks":78,"takeaways":172,"next_step":178},"design-tools-an-agent-can-use","Designing usable tools","Designing tools an agent can actually use","A connected server is not a useful server. The model only sees your tool names, descriptions and parameter schemas, so those three things are the entire user interface. Here is what makes a tool get called correctly and what makes it get ignored.","11 min",false,{"title":75,"description":76,"keywords":77},"How to Design MCP Tools an AI Agent Will Use Correctly","Tool names, descriptions and schemas are the only interface a model sees. Practical rules for writing MCP tools that get called at the right time with the right arguments.","mcp tool design, agent tool description, tool schema best practices, why agent not calling tool, mcp server design",[79,84,93,118,123,132,137,157,167],{"type":80,"paragraphs":81},"prose",[82,83],"Once a server is connected, the model does not read your code. It reads a list: each tool's name, its description, and a JSON schema of its parameters. That is the whole interface. Everything you know about what the tool does that is not written in those three places is invisible.","This is why two servers that do the same job can behave completely differently. One gets called at the right moment with sensible arguments. The other sits unused, or gets called with the wrong thing and returns an error the model then apologises for. The difference is almost never the implementation.",{"type":85,"title":86,"intro":87,"items":88},"list","The four questions a description has to answer","Write the description for a competent colleague who has never seen your system and cannot ask you anything.",[89,90,91,92],"What does this return? Not what it does internally — what comes back. \"Returns the current listed price, currency and stock status for one product URL\" beats \"scrapes a product page\".","When should it be used instead of answering directly? Say it explicitly: \"Use this whenever the user asks about a current price. Do not answer from memory; listed prices change daily.\"","When should it not be used? Boundaries prevent the expensive failure mode of a tool being called on everything. \"This handles one URL at a time. For a whole catalogue, use list_monitored_products.\"","What does an argument look like? One real example in the description does more than a paragraph of prose. \"url: the full product page URL, e.g. https://www.example.com/p/12345\".",{"type":94,"title":95,"intro":96,"headers":97,"rows":101},"table","The same tool, written two ways","Both of these are valid. Only one gets called when it should.",[98,99,100],"Field","Weak version","Version that works",[102,106,110,114],[103,104,105],"Name","fetch","get_product_price",[107,108,109],"Description","Fetches data from a URL.","Returns the current listed price, currency, availability and the time it was checked, for a single retailer product page. Use this any time the user asks what something costs right now. Do not answer price questions from memory.",[111,112,113],"Parameter","input (string)","url (string): full product page URL, e.g. https://www.example.com/p/12345",[115,116,117],"Empty result","Returns [] with no explanation.","Returns a reason string: \"page_blocked\", \"no_price_found\" or \"not_a_product_page\".",{"type":80,"title":119,"paragraphs":120},"Fewer tools, more clearly separated",[121,122],"There is a strong temptation to expose everything your API can do. Resist it. Every extra tool is another line the model has to read and another chance to pick the wrong one, and the failure mode of too many similar tools is not an error — it is a plausible-looking call to the nearly-right one.","If two tools share most of their description, they should probably be one tool with a parameter. If a tool has eleven optional parameters, it is probably two tools. The test is whether you can state in one sentence when to use each, without using the word \"or\".",{"type":85,"title":124,"intro":125,"items":126},"Make results readable, not just correct","The output goes into the model's context as text. Shape it accordingly.",[127,128,129,130,131],"Return units and currency inside the payload. A bare 24.99 is ambiguous and the model will guess.","Include when the data was captured. A timestamp in the result is what lets an agent say \"as of this morning\" instead of implying it is live to the second.","Keep it small. A 200KB blob of raw HTML crowds out everything else in the context window and the model will usually extract the wrong field from it anyway. Return the five fields you parsed, not the page.","Say so when there is nothing. An empty array is indistinguishable from a successful check that found no change. A short reason code is not.","Fail loudly. An error the model can read — \"rate limit reached, retry in 60 seconds\" — produces sensible behaviour. A silent empty result produces a confident wrong answer.",{"type":133,"variant":134,"title":135,"text":136},"callout","note","Test the description, not the function","Your unit tests prove the function returns the right thing. They say nothing about whether the model calls it. The only test that matters here is behavioural: ask the agent five questions it should use the tool for and five it should not, and look at which calls it actually made. If it skipped the tool, the description is wrong. Change one sentence, run the ten questions again.",{"type":94,"title":138,"intro":139,"headers":140,"rows":144},"Worked example: the same result, three payloads","The description decides whether a tool gets called. The payload decides whether the answer is worth anything. All three of these carry the correct price for the same product at the same moment, and only the third lets the model say something a colleague could check.",[141,142,143],"","What comes back","What the agent can honestly say",[145,149,153],[146,147,148],"Raw","a fragment of markup containing 199,00 €","Something about 199, with the decimal comma and the currency position both guessed at",[150,151,152],"Thin","{ \"price\": 199 }","\"It is 199.\" No currency, no date, no source, and nothing to cite",[154,155,156],"Usable","{ \"price\": 199.00, \"currency\": \"EUR\", \"captured_at\": \"2026-03-14T06:14:00Z\", \"availability_text\": \"In stock\", \"source_url\": \"https://…/p/12345\" }","\"€199.00, in stock, read at 06:14 UTC on 14 March\" — with a link, and with the age of the figure visible to the model rather than only to you",{"type":85,"title":158,"intro":159,"items":160},"What usually goes wrong","Every item here describes a tool that works perfectly and is used badly, or not at all.",[161,162,163,164,165,166],"Writing the description for a human reviewer. The model is the reader. \"Returns product data\" is a sentence a person understands and a model cannot act on.","Leaving out the negative case. A description that never says when not to use the tool will see it used for everything, including the questions it answers wrongly.","Shipping one tool per endpoint. Forty tools means forty near-identical descriptions, and the model is choosing between them on wording alone.","Returning HTML. Every character of markup is tokens you pay for and a parsing job the model does unreliably.","Omitting units and currency. 199 is not a price; it is a number that happens to be near one.","Testing the function rather than the description. The unit test passes, the agent never calls the tool, and no test you have can see that.",{"type":80,"title":168,"paragraphs":169},"Why this lands harder with web data than with most tools",[170,171],"A calendar tool either returns your events or errors. A web data tool has a third state that looks like success: it ran, it returned, and the numbers are wrong because the page layout changed, or you got a localised version of the site, or the listed figure excludes shipping.","Nothing in the protocol protects you from that. The protection is in the payload design — return the source URL, the capture time and a confidence or status field alongside the number, so the model has something to be cautious with. An agent that can see \"status: price_from_cache, 3 days old\" will hedge. An agent handed a bare number will not.",[173,174,175,176,177],"The model sees only names, descriptions and schemas — that is your entire interface.","A description must say what comes back, when to use it, when not to, and what an argument looks like.","Fewer, clearly separated tools beat complete API coverage.","Return parsed fields with units, currency and a timestamp — never raw HTML.","Test whether the agent calls the tool, not whether the function works.",{"text":179,"label":180,"url":181},"The principles are easier to see against something concrete. Next, wiring a real price feed into an agent end to end.","Lesson 5: giving an agent a scraper","/learn/ai-agent-web-data-mcp/give-an-agent-a-scraper",3,[184,190,196,201,202,209],{"slug":185,"navTitle":186,"title":187,"summary":188,"time":189,"needsAccount":73},"what-is-mcp","What MCP is","What MCP actually is, in plain terms","The Model Context Protocol described without jargon: what problem it solves, its three primitives, and when it is the wrong tool.","9 min",{"slug":191,"navTitle":192,"title":193,"summary":194,"time":195,"needsAccount":73},"why-agents-get-live-data-wrong","Why agents get it wrong","Why your agent's answer about a price is wrong","Four distinct failure modes that all look identical from the outside, and how to tell which one you have before you try to fix it.","10 min",{"slug":197,"navTitle":198,"title":199,"summary":200,"time":195,"needsAccount":73},"connect-an-mcp-server","Connecting a server","Connecting an MCP server and proving it works","The config for local and remote servers, the four things that go wrong, and how to verify the tools registered rather than assuming.",{"slug":68,"navTitle":69,"title":70,"summary":71,"time":72,"needsAccount":73},{"slug":203,"navTitle":204,"title":205,"summary":206,"time":207,"needsAccount":208},"give-an-agent-a-scraper","Giving an agent a scraper","Giving an agent a real price feed","A worked example. Connect the ScrapeWise MCP server to a client, let the agent read a live scraper's output, and watch where the hand-off between \"the data is right\" and \"the answer is right\" actually breaks.","12 min",true,{"slug":210,"navTitle":211,"title":212,"summary":213,"time":72,"needsAccount":73},"guardrails-cost-and-untrusted-content","Guardrails and cost","Guardrails, cost control and untrusted content","Live web access turns an agent into something that can spend money and read text written by strangers. Neither is a reason not to do it. Both are reasons to put limits in before you need them.",{"slug":197,"navTitle":198,"title":199,"summary":200,"time":195,"needsAccount":73},{"slug":203,"navTitle":204,"title":205,"summary":206,"time":207,"needsAccount":208},1791047867055]