
Lesson Description
The "Add a Tags Tool" Lesson is part of the full, Complete Intro to MCP course featured in this preview video. Here's what you'd learn in this lesson:
Brian adds a tags tool that retrieves a list of tags from the application. This allows the LLM to create issues and add tags from what's available in the issue tracker.
Transcript from the "Add a Tags Tool" Lesson
[00:00:00]
>> Brian Holt: Let's add tags, right? Because right now if I say, hey, add a tag of bug or feature or something like that, it can't do it because it actually doesn't know the numbers of the tags because the tags are all stored in a different table. So this time I'm not going to make you write it, we're just gonna copy and paste it.
[00:00:19]
Come back over here and just copy this block right here. So tags list, okay? Then come back over to your VS code somewhere underneath this, this one right there. So here we're just gonna create another tool and we're gonna call it Tags List. It lists all the tags and that's really all it does.
[00:00:49]
It doesn't really do much else besides goes and gets all the available tags plus their IDs, right? Okay, and then now you can copy this prompt as well if you want.
>> Brian Holt: That's cool, make sure you stop and restart it because it does have to restart your MCP server.
[00:01:18]
>> Brian Holt: I'm going to come back into the same chat here. Reason being is that it already has a valid API key and I don't wanna go and validate it. And it'll be smart enough to reuse it, which is cool. I don't even care if it's formatted. Can I just paste without style?
[00:01:34]
Nope, doesn't care, okay. But they create a new issue in my issue tracker that says, Add Microsoft login to my app, mark it as not started. Mark it as urgent priority and add the tags front end and feature.
>> Brian Holt: So notice it's gonna do tags-list first, right? It goes and grabs all the tags, then it's going to call issue create and it's gonna to get the proper tags 1 and 4.
[00:02:07]
Obviously Claude did this just fine. I would bet you even Quinn 0.6 billion would probably get it right. But the smaller the things, the more sequential things, the more the house of cards you build up, the more likely it is to fail, right? Do you see why I'm wanting you to do not API based things, but jobs based things?
[00:02:29]
I promise you that you will have a much better time and so will your users if you do it that way. But let's go see, just to drive it home here, issue number 10 has feature and front end there as well, right? Urgent not started. We could go in and do assigned user and all that kind of stuff as well.
[00:02:53]
I'm just going to have you copy the entire API and you can start messing around with it. But let's pause here for a second, what questions do you have about this?
>> Speaker 2: How does the testing workflow fit here for unit testing, do we just test the underlying JavaScript as usual?
[00:03:13]
>> Brian Holt: Yeah, that is what's very nice about MCP servers. Just wildly easy to test, right, cuz it's meant to be a very deterministic behavior. And the nice thing about it is AI is really good at writing tests. I use it all the time because I don't like writing tests.
[00:03:31]
I'm supposed to write tests, [LAUGH]. So I just say, here's a block of code, please write me a suite of tests that test these kind of things. By all means, please go make sure that the tests are actually testing what you desire them to test. Because AI is also very good at writing tests that will make itself pass because it wants to make you happy, right?
[00:03:49]
But it's very easy to test standard I/O. It's very easy to test HTTP. So I would just say, hey, Claude, here's my MCP server, I'm going to go get a coffee, you test all this stuff. You got it? Okay, good. Then I just go, forget about it, and then run away.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops