Problem: Outdated Package Knowledge0:08
All right, here's one thing you will often run into. Sometimes an agent will be interacting with maybe a package you have installed and it just doesn't know that much about it. Sometimes it'll just guess, or sometimes it'll scan the web and try to find some article that could potentially be wildly outdated. We've all run into this many times. So one way to get around to this is to leverage a tool like context seven.
Introducing Context Seven0:26
So one way to get around to this is to leverage a tool like context seven. Have a look. Yeah, so context seven provides up-to-date documentation for LLMs. So yeah, you can see, of course it has support for all of the most popular tools, but even smaller packages is maybe you're using like a, a, a spot sea library and maybe you wanna give it up to date information on how to generate images. Then you could pull this in, which is really cool.
to date information on how to generate images. Then you could pull this in, which is really cool. So I'll show you an example. Uh, I use a package for interacting with a Telegram bot. Uh, it's a composure package and it's called Nut Graham. So the first time I interacted with my hn, it just didn't know that much about it and it made so many mistakes, but I could enhance it skills by basically saying, Hey, here's the documentation.
Context Seven Signup Overview1:05
but I could enhance it skills by basically saying, Hey, here's the documentation. Go learn it. And only at that point should you proceed. So let's see how we can make use of this. Let's open up Netra, or actually let's go into the documentation and if we scroll down, we can see a context summary of how to use it. This is all incredibly helpful. Okay, so we can sign up for a free plan. Once you do, you can go to the dashboard.
Generating an API Key1:23
Okay, so we can sign up for a free plan. Once you do, you can go to the dashboard. You'll see I already have an API key here, but let's just generate one on the fly. All right? And I'm gonna copy that and then delete it at the end of the video. All right. Next we need to connect it to PHP Storm and Junie. If we're using that or cloud code, just find the one you prefer.
Configuring MCP in JetBrains1:40
If we're using that or cloud code, just find the one you prefer. So in our case, let's see if we have something for JetBrains. Let's see. Here we go. I'm gonna look for JetBrains. There we go. So all you have to do really is set up the MCP server. So here it is. I'm just gonna grab this and then we can use this with, um, with uni
I'm just gonna grab this and then we can use this with, um, with uni or really it'll work uh, anywhere. Okay? Alright, so from PHP Storm, I will open up my settings and we're gonna look for uni. So remember this is uni specific MCP settings. If you're using Claude, then you would need to add it, um, the way they suggest on the website. All right, so we're gonna add a new MCP server and we're just gonna paste it in right here.
All right, so we're gonna add a new MCP server and we're just gonna paste it in right here. Alright, so notice that we do need to provide an API key. So I will update this with the one we just copied and generated like so. Alright, there, it's, so that should do it. And by the way, whenever you set up an MCP server, always make sure that you have it activated there. Okay? And that's it. Okay, so now all we have to do is ask Junie in this case,
Using Context Seven in Junie2:38
Okay? And that's it. Okay, so now all we have to do is ask Junie in this case, to use it like this, I'd like you to review my Telegram bot code that leverages the Nut Graham, uh, library. Use context seven to confirm that I'm following best practices and let's say C app services Telegram folder. All right, that's it. So the key here is that we said use context seven.
All right, that's it. So the key here is that we said use context seven. That's like the trigger. All right, let's go. Okay, so it's read some files and here is the key prompt. Can it use the context seven MCP server? Yes. So it's gonna figure out what the library ID is and then it's gonna query the UpToDate documentation as you see here. Alright, that's done. So let's take a look together. Alright, so changed the handful of files I've reviewed.
Alright, that's done. So let's take a look together. Alright, so changed the handful of files I've reviewed. The telegram bot implementation, applied several improvements following Nut Graham and Laravel best practices. Great. So yeah, uh, I was using a standard Laravel middleware, but actually, uh, nut gram has its own concept of middleware built in. So it looks like it implemented that
of middleware built in. So it looks like it implemented that and it applied, uh, that global registration within our telegram routes file. So real quick, I'll show you. Let's go in there. And yeah, now it registered and authorized admin middleware as part of Nut Graham and it figured that out because of the documentation. Okay, but anyways, what else? Uh, it updated our tests, some of which were failing.
Okay, but anyways, what else? Uh, it updated our tests, some of which were failing. It ran pint. It did an architectural review. It's reviewing my telegram surface class. It's a useful abstraction for sending outgoing notifications correctly. Wraps the neck Graham instance. All right, no major refactoring within. Okay. Whew. Good. Uh, but yeah, you get the idea. So I know it seems like a small thing
Uh, but yeah, you get the idea. So I know it seems like a small thing that may not be necessary and trust me, especially for some packages without it, AI is sort of flying blind or it's gonna search the web and try to find something to help it. And so often that information is wildly out of date or doesn't match the current version you have installed. So definitely consider something like context seven.
So definitely consider something like context seven.
