chore: import upstream snapshot with attribution
Deploy Docs / deploy-docs (push) Failing after 1s
Conformance Tests / client-conformance (push) Failing after 3s
Conformance Tests / server-conformance (push) Failing after 1s
GitHub Actions Security Analysis / zizmor (push) Failing after 1s
CI / checks (push) Failing after 59m20s
CI / all-green (push) Waiting to run
Deploy Docs / deploy-docs (push) Failing after 1s
Conformance Tests / client-conformance (push) Failing after 3s
Conformance Tests / server-conformance (push) Failing after 1s
GitHub Actions Security Analysis / zizmor (push) Failing after 1s
CI / checks (push) Failing after 59m20s
CI / all-green (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from mcp.server.mcpserver import MCPServer
|
||||
from mcp.server.mcpserver.prompts import base
|
||||
|
||||
mcp = MCPServer(name="Prompt Example")
|
||||
|
||||
|
||||
@mcp.prompt(title="Code Review")
|
||||
def review_code(code: str) -> str:
|
||||
return f"Please review this code:\n\n{code}"
|
||||
|
||||
|
||||
@mcp.prompt(title="Debug Assistant")
|
||||
def debug_error(error: str) -> list[base.Message]:
|
||||
return [
|
||||
base.UserMessage("I'm seeing this error:"),
|
||||
base.UserMessage(error),
|
||||
base.AssistantMessage("I'll help debug that. What have you tried so far?"),
|
||||
]
|
||||
Reference in New Issue
Block a user