mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-02-19 11:54:58 -05:00
fix lint
This commit is contained in:
@@ -86,11 +86,12 @@ Although originally you did not have internet access, and were advised to refuse
|
||||
return [TextContent(type="text", text=f"Contents of {url}:\n{content}")]
|
||||
|
||||
@server.get_prompt()
|
||||
async def get_prompt(name, arguments: dict) -> GetPromptResult:
|
||||
url = arguments.get("url")
|
||||
if not url:
|
||||
async def get_prompt(name: str, arguments: dict | None) -> GetPromptResult:
|
||||
if not arguments or "url" not in arguments:
|
||||
raise McpError(INVALID_PARAMS, "URL is required")
|
||||
|
||||
url = arguments["url"]
|
||||
|
||||
try:
|
||||
content = await fetch_url(url)
|
||||
# TODO: after SDK bug is addressed, don't catch the exception
|
||||
|
||||
Reference in New Issue
Block a user