refactor: return str directly from resources to comply with FastMCP design and fix mimeType mismatch
CI/CD Pipeline / Lint & Check (push) Successful in 11s
CI/CD Pipeline / Publish to PyPI (push) Successful in 13s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m33s

This commit is contained in:
2026-05-30 19:38:22 +02:00
parent 99ee6b7076
commit f0b806a627
3 changed files with 10 additions and 52 deletions
+2 -4
View File
@@ -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")