Skip to main content
Glama
optuna

Optuna MCP Server

Official
by optuna

plot_contour

Generate contour plots to visualize the relationship between hyperparameters and objective values in optimization studies.

Instructions

Return the contour plot as an image.

    Args:
        params:
            Parameter list to visualize. The default is all parameters.
        target:
            An index to specify the value to display. To plot nth objective value, set this to n.
            Note that this is 0-indexed, i.e., to plot the first objective value, set this to 0.
        target_name:
            Target’s name to display on the color bar.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNo
targetNo
target_nameNoObjective Value
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Return the contour plot as an image' but does not specify the image format (e.g., PNG bytes, file path) or side effects (e.g., whether it modifies the study). It also does not mention if a study session is required or any performance implications. The parameter indexing note (0-indexed) is useful but insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a docstring with a clear one-line summary followed by parameter details. It is concise and free of fluff. Each sentence serves a purpose. The parameter descriptions are appropriately detailed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should specify the return type (e.g., bytes, base64 string). It does not. It also omits context about the required environment (e.g., an active study with trials) and whether this tool can be called stand-alone. The tool name suggests Optuna integration, but the description does not clarify dependencies.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must add meaning. It explains that 'params' is a parameter list to visualize (default all), 'target' is a 0-indexed objective value index, and 'target_name' is the color bar label. This adds significant semantic value beyond the schema's default titles. However, it could further clarify valid values for 'params' (e.g., must be parameter names from the study).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Return the contour plot as an image.' This clearly indicates the action and output. It distinguishes from sibling plot tools like plot_slice or plot_parallel_coordinate by specifying 'contour plot'. However, it lacks context on what a contour plot represents in the optimization framework, e.g., visualizing objective function over two parameters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use contour plots over alternatives like plot_slice or plot_parallel_coordinate. It does not mention prerequisites (e.g., must have a study with trials) or exclusions. The Args section only documents parameters without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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