Skip to content

Commit 6ba97f6

Browse files
committed
remove last section from 11-prompts
1 parent 7d7a4d1 commit 6ba97f6

File tree

1 file changed

+1
-19
lines changed
  • asciidoc/courses/genai-mcp-build-custom-tools-python/modules/2-database-features/lessons/11-prompts

1 file changed

+1
-19
lines changed

asciidoc/courses/genai-mcp-build-custom-tools-python/modules/2-database-features/lessons/11-prompts/lesson.adoc

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,7 @@ Prompts are ideal for common workflows and complex requests. In our movie server
187187
While tools are functions that execute code when the LLM needs them, prompts are pre-written templates that users explicitly select. They work together - a prompt might guide the user to ask questions that lead the LLM to call specific tools. For example, a movie recommendation prompt could guide the conversation that leads to calling the `search_movies_by_genre()` tool.
188188

189189

190-
== Adding Prompts to Your Server
191-
192-
Prompts are simple to add - just use the decorator:
193-
194-
[source,python]
195-
----
196-
@mcp.prompt()
197-
def movie_discovery(genre: str = "any") -> str:
198-
"""Discover new movies in a genre."""
199-
200-
if genre == "any":
201-
return """Help me discover new movies! What genres do I enjoy?
202-
What recent movies have I loved? Do I prefer classics or new releases?"""
203-
204-
return f"""Recommend 5 diverse {genre} movies that span different
205-
styles and eras. Explain why each is a great example of the genre."""
206-
----
207-
190+
read::Mark as Completed[]
208191

209192
[.summary]
210193
== Summary
@@ -221,6 +204,5 @@ In this lesson, you learned about MCP prompts:
221204
Prompts make your server more user-friendly by providing pre-written templates for common tasks.
222205

223206

224-
read::Mark as Completed[]
225207

226208
In the next module, you'll learn how to integrate MCP tools into your development workflows.

0 commit comments

Comments
 (0)