Skip to main content
Glama

plot_timeline

Generate timeline plots as images to visualize optimization progress and results, facilitating interactive analysis of hyperparameter optimization experiments on the Optuna MCP Server.

Instructions

Return the timeline plot as an image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'plot_timeline' tool. It uses Optuna's visualization module to create a timeline plot of the study and returns it as a PNG image via FastMCP's Image type.
    @mcp.tool() def plot_timeline() -> Image: """Return the timeline plot as an image.""" fig = optuna.visualization.plot_timeline(mcp.study) return Image(data=plotly.io.to_image(fig), format="png")
  • The register_tools function (lines 100-669) registers all tools including plot_timeline via @mcp.tool() decorators, and it is called here in main() to register the tools on the MCP server instance.
    mcp = register_tools(mcp)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/optuna/optuna-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server