docs: cover the remaining Tier 1 audit items (#3325)
This commit is contained in:
parent
2a1cc94493
commit
9057285683
1 changed files with 247 additions and 1 deletions
17
docs_src/prompts/tutorial005.py
Normal file
17
docs_src/prompts/tutorial005.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from pathlib import Path
|
||||
|
||||
from mcp.server import MCPServer
|
||||
from mcp.server.mcpserver import Image, Message, UserMessage
|
||||
|
||||
mcp = MCPServer("Code Helper")
|
||||
|
||||
DIAGRAM_FILE = Path(__file__).parent / "architecture.png" # or the path to your file on disk
|
||||
|
||||
|
||||
@mcp.prompt()
|
||||
def explain_component(component: str) -> list[Message]:
|
||||
"""Explain one component using the architecture diagram."""
|
||||
return [
|
||||
UserMessage(Image(path=DIAGRAM_FILE)),
|
||||
UserMessage(f"Where does {component} sit in this architecture, and what does it talk to?"),
|
||||
]
|
||||
Loading…
Reference in a new issue