refactor: return str directly from resources to comply with FastMCP design and fix mimeType mismatch
This commit is contained in:
@@ -115,8 +115,7 @@ async def generate():
|
||||
|
||||
print("Generating mock map HTML from resource...")
|
||||
resource_handler = mcp.resources["strava://activity/{activity_id}/map"]
|
||||
resource_result = await resource_handler(99999)
|
||||
html_text = resource_result.contents[0].text
|
||||
html_text = await resource_handler(99999)
|
||||
|
||||
if html_text:
|
||||
output_path = os.path.join(os.path.dirname(__file__), "..", "test.html")
|
||||
@@ -176,8 +175,7 @@ async def generate():
|
||||
|
||||
print("Generating map HTML from resource...")
|
||||
resource_handler = mcp.resources["strava://activity/{activity_id}/map"]
|
||||
resource_result = await resource_handler(activity_id)
|
||||
html_text = resource_result.contents[0].text
|
||||
html_text = await resource_handler(activity_id)
|
||||
|
||||
if html_text:
|
||||
output_path = os.path.join(os.path.dirname(__file__), "..", "test.html")
|
||||
|
||||
Reference in New Issue
Block a user