Fix double image/ prefix in chart MIME type
FastMCP's Image class prepends "image/" to the format string, so passing "image/png" produced "image/image/png". Use bare "png".
This commit is contained in:
parent
f6e1fee392
commit
5649d0004a
@ -92,7 +92,7 @@ def register(mcp: FastMCP) -> None:
|
|||||||
from mcnoaa_tides.charts.tides import render_tide_chart_png
|
from mcnoaa_tides.charts.tides import render_tide_chart_png
|
||||||
|
|
||||||
png_bytes = render_tide_chart_png(predictions, observed, station_name)
|
png_bytes = render_tide_chart_png(predictions, observed, station_name)
|
||||||
return Image(data=png_bytes, format="image/png")
|
return Image(data=png_bytes, format="png")
|
||||||
else:
|
else:
|
||||||
from mcnoaa_tides.charts.tides import render_tide_chart_html
|
from mcnoaa_tides.charts.tides import render_tide_chart_html
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ def register(mcp: FastMCP) -> None:
|
|||||||
from mcnoaa_tides.charts.conditions import render_conditions_png
|
from mcnoaa_tides.charts.conditions import render_conditions_png
|
||||||
|
|
||||||
png_bytes = render_conditions_png(snapshot, station_name)
|
png_bytes = render_conditions_png(snapshot, station_name)
|
||||||
return Image(data=png_bytes, format="image/png")
|
return Image(data=png_bytes, format="png")
|
||||||
else:
|
else:
|
||||||
from mcnoaa_tides.charts.conditions import render_conditions_html
|
from mcnoaa_tides.charts.conditions import render_conditions_html
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user