Skip to main content
Glama
optuna

Optuna MCP Server

Official
by optuna

ask

Suggests new hyperparameters to explore based on the specified search space using Optuna's distribution definitions.

Instructions

Suggest new parameters using Optuna

    search_space must be a string that can be evaluated to a dictionary to specify Optuna's distributions.

    Example:
        {"x": {"name": "FloatDistribution", "attributes": {"step": null, "low": -10.0, "high": 10.0, "log": false}}}
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_spaceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
trial_numberYes
paramsNoThe parameter values suggested by the trial.
valuesNoThe objective values of the trial.
user_attrsNoUser-defined attributes for the trial.
system_attrsNoSystem-defined attributes for the trial.
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 mentions 'suggest new parameters' but does not disclose that calling 'ask' creates a new trial in Optuna (a side effect). The agent may incorrectly assume it is a read-only operation.

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

Conciseness3/5

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

The description is short but includes an example. However, key information is not front-loaded, and the structure could be improved with a clear summary sentence first, then details.

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?

Despite having one parameter, the description does not mention the return value (even though an output schema exists). It also lacks context about using the suggested parameters with other tools like 'tell'. The contradictory type information further reduces completeness.

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

Parameters1/5

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

The description adds meaning by specifying the expected structure of search_space as a string that evaluates to a dictionary, but this directly contradicts the input schema which declares search_space as an object. This creates confusion and misleads the agent about how to provide the parameter.

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 'Suggest new parameters using Optuna' clearly states the tool's action (suggest), the resource (new parameters), and the method (Optuna). It distinguishes from siblings like 'best_trial' or 'add_trial' which retrieve existing results or add specific trials.

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 an example of the search_space format but does not explain when to use 'ask' versus siblings like 'tell' or 'best_trial'. It also contradicts the input schema by stating search_space must be a string while the schema defines it as an object, potentially confusing the agent.

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