Module 3 video goes live soon. The full lesson is below, and the checkpoint is ready to download.

Assignment: a tool that finds a past decision

Lesson 21 of 30, Module 3: Make It Trustworthy. It refuses to leave the folder, asks before it overwrites, and remembers your answers.

Table of Contents
Downloads

Lesson 21 of 30, Module 3: Make It Trustworthy. It refuses to leave the folder, asks before it overwrites, and remembers your answers.

What you can do after this lesson

A tool that hands back everything makes the model read everything. Filter inside the tool so only the notes that match come back. And you only know you are done when your output matches an expected output you can check yourself.

The problem we inherited

A server that can write can write over the wrong document, and there is no undo you can reach from a chat.

Code in this lesson

Every block the lesson shows on screen, in the order it appears.

Use scribe to remember: keep my openings under 12 words.
Use scribe to remember: the launch post goes out on Monday.
Use scribe to find the note about openings.
2026-09-30: keep my openings under 12 words.
Use scribe to find the note about zebras.
No note mentions zebras.

Downloads

Prefer to read?

The written version of this part of the course is on Substack: https://genaiunplugged.substack.com/p/give-your-ai-agents-memory-mcp-shared.

Lesson transcript

Your turn

Today I do not build anything. You do.

Hello, and welcome to lesson 21 of the MCP Masterclass. Last lesson you gave Scribe a memory. Today you add 1 tool to it, on your own, and I tell you exactly how you will know whether it works. And we start with our map, as always.

13 lit boxes. Nothing lights up today, because today the building is yours.

The problem with recall

Well, here is the problem, and it is a real one.

Recall gives back every note, oldest first. After 1 week that is fine. After 3 months of rules and choices it is a wall of text, and Claude has to read all of it to answer 1 question.

What you want is a tool that finds the note you mean. Ask it for openings, and it gives back only the notes that mention openings.

The assignment

So here is the assignment. Build a tool called find_note.

It takes 1 word. It looks through every note in the memory. And it gives back only the notes that mention that word.

Three requirements.

One. Capital letters do not matter. Openings and openings with a capital O are the same word.

Two. If nothing matches, say so in a plain sentence. Not an empty answer, and not an error. Something a person would say.

Three. Each note comes back the way recall shows it. The date, then the note.

Three hints

Now the hints, because I want you to finish, not to guess.

Hint 1. You already have a function that reads every note. It is called notes, with the underscore in front. Use it, and do not read the file again.

Hint 2. A Python list can be filtered in 1 line. You want the notes whose text contains your word.

Hint 3. It is the same 5 steps. Write the plain Python function. Put the @mcp line above it. Write the one line docstring. Restart Claude Desktop. Ask Claude to use it.

How you will know it works

And here is how you will know you succeeded, before you watch my solution.

First, tell Scribe 2 things to remember.

Use scribe to remember: keep my openings under 12 words.
Use scribe to remember: the launch post goes out on Monday.

Then ask.

Use scribe to find the note about openings.

Expected output, and yours should say the same thing apart from the dates.

2026-09-30: keep my openings under 12 words.

One note, not two. Then ask for a word that is in no note at all.

Use scribe to find the note about zebras.

Expected output.

No note mentions zebras.

If you get those 2 answers, you are done, and you did it without me.

Pause here

Pause the video here. Come back when it works, or when you are stuck, and next lesson I show you mine.

Bye now, and I will see you in the next lesson.

Your assignment

Add a tool called find note to Scribe. It takes 1 word, searches every note in the memory, and returns only the notes that mention that word. (1) Capital letters do not matter. (2) If nothing matches, return a plain sentence a person would say, never an empty answer or an error. (3) Each note comes back the way recall shows it: the date, then the note.

Hints:

  • You already have a function that reads every note, the underscore notes one. Use it and do not read the file again.
  • A Python list can be filtered in 1 line. You want the notes whose text contains your word.
  • It is the same 5 steps: write the plain Python function, put the at m c p line above it, write the one-line docstring, restart Claude Desktop, ask Claude to use it.

Expected output (you know you succeeded when):

Tell Scribe 2 things to remember, then ask find note for a word that appears in only one of them. Expect exactly one note back (not two), date then note, the same as shown on screen apart from the dates. Then ask for a word that is in no note. Expect a plain sentence saying nothing matched. If you get those 2 answers, you are done.

Frequently Asked Questions

The written version of this part of the course is on Substack: https://genaiunplugged.substack.com/p/give-your-ai-agents-memory-mcp-shared.

Dheeraj Sharma

Dheeraj Sharma

AI Systems Builder
Creator of the n8n Zero to Hero course (42 lessons, 31+ hours). I help solopreneurs build AI systems that grow revenue without growing workload.

Get the Scribe checkpoints and code

Every module ships a checkpoint zip with the server exactly as the module leaves it, so you can start any lesson from working code.

Open the GitHub repo