<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jameson</title>
    <description>The latest articles on DEV Community by Jameson (@jameson-bear).</description>
    <link>https://dev.to/jameson-bear</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4116165%2Fb204833c-ea2a-4c4f-b4aa-6627e99130d6.gif</url>
      <title>DEV Community: Jameson</title>
      <link>https://dev.to/jameson-bear</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jameson-bear"/>
    <language>en</language>
    <item>
      <title>Context7 fixed the thing I kept blaming myself for</title>
      <dc:creator>Jameson</dc:creator>
      <pubDate>Wed, 09 Sep 2026 09:19:15 +0000</pubDate>
      <link>https://dev.to/jameson-bear/context7-fixed-the-thing-i-kept-blaming-myself-for-3k41</link>
      <guid>https://dev.to/jameson-bear/context7-fixed-the-thing-i-kept-blaming-myself-for-3k41</guid>
      <description>&lt;p&gt;I'm a vibe coder. I describe what I want, I read the diff, and if it runs I keep going. That gets me a long way, and then it fell apart in a very specific and very confusing way.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setting
&lt;/h2&gt;

&lt;p&gt;I was building a small static site with Astro. I needed to load a folder of Markdown files and list them. Bread and butter stuff. I asked for it, and got back something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Astro&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;glob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./posts/*.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confident, idiomatic, and completely non-existent.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Astro.glob()&lt;/code&gt; was removed in Astro 6. I'm on Astro 7. There was no deprecation warning first, it was simply gone, and the error I got was the kind of unhelpful undefined-is-not-a-function noise that makes you assume you've misconfigured your own project.&lt;/p&gt;

&lt;p&gt;So I did what a vibe coder does: I assumed it was me. I checked my folder structure. I moved files around. I asked the assistant to fix its own error, and it produced a content-collections config in the old shape (&lt;code&gt;src/content/config.ts&lt;/code&gt;, no loader) which was &lt;em&gt;also&lt;/em&gt; removed in Astro 6. Two wrong answers in a row, both of which used to be exactly right.&lt;/p&gt;

&lt;p&gt;I lost most of an evening to this before the penny dropped. The assistant wasn't hallucinating. It was answering correctly for Astro 4, and nobody had told it Astro 4 was over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why prompting harder doesn't help
&lt;/h2&gt;

&lt;p&gt;This took me too long to understand. A model's library knowledge is frozen at its training cutoff, and it has no way to know which version of Astro is in my &lt;code&gt;package.json&lt;/code&gt;. So it averages everything it ever saw, and for a library that's shipped three majors since, the average is wrong.&lt;/p&gt;

&lt;p&gt;You can't prompt your way out of missing information. Telling it to "use the latest Astro API" just makes it confidently guess what latest means.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Context7 actually does
&lt;/h2&gt;

&lt;p&gt;Context7 is an MCP server whose entire job is to fetch current library documentation and put it into the model's context &lt;em&gt;before&lt;/em&gt; it answers. The model is unchanged and the output isn't post-processed. It's a retrieval step in front of the thing that was already guessing. It exposes two tools: one that maps a name like "Astro" to a library it has indexed, and one that fetches the current docs for it, optionally scoped to a topic so you're not dumping an entire manual into your context window.&lt;/p&gt;

&lt;p&gt;The install I'd recommend is &lt;a href="https://mcpcontext7.com/install" rel="noopener noreferrer"&gt;the remote HTTP one&lt;/a&gt;, because there is genuinely nothing to install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--scope&lt;/span&gt; user &lt;span class="nt"&gt;--transport&lt;/span&gt; http context7 https://mcp.context7.com/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's no &lt;code&gt;npx&lt;/code&gt;, no Node process idling in the background, and no package to keep current. Most guides lead with a local installer; skip it unless you specifically want a local process. Restart, then run &lt;code&gt;claude mcp list&lt;/code&gt; and check &lt;code&gt;context7&lt;/code&gt; is in it. Other editors take the same URL as JSON, and annoyingly no two of them agree on the shape: &lt;a href="https://mcpcontext7.com/cursor" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt; and &lt;a href="https://mcpcontext7.com/vscode" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt; want different top-level keys. I wrote each one down so I'd stop re-deriving them.&lt;/p&gt;

&lt;p&gt;Then I asked the same question again, with &lt;code&gt;use context7&lt;/code&gt; on the end. This time it came back with the actual current API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineCollection&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;astro:content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;glob&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;astro/loaders&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defineCollection&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;loader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;glob&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./src/content/posts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;**/*.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which is right, and which I would not have got to on my own without reading the migration guide I was specifically trying to avoid reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed, concretely
&lt;/h2&gt;

&lt;p&gt;The failure mode I described at the top has stopped happening. The specific thing where I burn an evening on an API that was removed two majors ago is gone, because the docs are in the prompt now.&lt;/p&gt;

&lt;p&gt;Two honest caveats. It doesn't make the model better at programming: my logic bugs are still entirely mine. And it only knows public library documentation, so it has nothing to say about my own modules.&lt;/p&gt;

&lt;p&gt;The case for it is narrow and extremely common: a library moving faster than the model's cutoff, and a version you can name. If you've ever argued with an assistant about whether a method exists, and then found out you were both describing real APIs from different years, this is what fixes it.&lt;/p&gt;

&lt;p&gt;If you get stuck wiring it up, the error strings are their own adventure and I wrote them down at &lt;a href="https://mcpcontext7.com/troubleshooting" rel="noopener noreferrer"&gt;mcpcontext7.com/troubleshooting&lt;/a&gt;. &lt;code&gt;MCP error -32000&lt;/code&gt; means two completely different things depending on the message next to it, which I discovered the slow way.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>astro</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
