From the course: Claude with Amazon Bedrock by Anthropic
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Prompts in the client
From the course: Claude with Amazon Bedrock by Anthropic
Prompts in the client
Our last major task is to implement some functionality inside of our MCP client and allow us to list out all the different prompts that are defined inside the MCP server and also get a particular prompt with some variables interpolated into it. So let's first implement list prompts. I will delete the comment and replace it with a result is await self session list prompts and then I will return result dot prompts and that's pretty much it. and then get prompt. Now to be clear, when we get a individual prompt, we're going to be given some number of arguments. These arguments will eventually show up inside of our prompt function. So for example, inside a format document right here, we expect to receive a document ID. Inside of this args dictionary, the expectation is that there will be a document ID key, and that will be passed in to the appropriate function over here, and then we will get that value interpolated into the prompt itself. So inside of the get prompt function, I will get a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introducing MCP4m 40s
-
(Locked)
MCP clients4m 56s
-
(Locked)
Project setup3m 24s
-
(Locked)
Defining tools with MCP7m 3s
-
(Locked)
The MCP Inspector3m 52s
-
(Locked)
Implementing a client8m 56s
-
(Locked)
Defining resources9m 45s
-
(Locked)
Accessing resources4m 38s
-
(Locked)
Defining prompts7m 45s
-
(Locked)
Prompts in the client3m 1s
-
(Locked)
MCP review4m 12s
-
(Locked)
-
-