Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jackadamson committed Nov 22, 2024
1 parent 20a03e7 commit 2647913
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fetch/src/mcp_server_fetch/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ async def call_tool(name, arguments: dict) -> list[TextContent]:
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)
Expand Down

0 comments on commit 2647913

Please sign in to comment.