@@ -65,9 +65,9 @@ class StudyResponse(BaseModel):
6565 study_name : str
6666 sampler_name : (
6767 typing .Literal ["TPESampler" , "NSGAIISampler" , "RandomSampler" , "GPSampler" ] | None
68- ) = Field (default = None , description = "The name of the sampler used in the study, if available ." )
68+ ) = Field (default = None , description = "The name of the sampler used in the study." )
6969 directions : list [str ] | None = Field (
70- default = None , description = "The optimization directions for each objective, if available ."
70+ default = None , description = "The optimization directions for each objective."
7171 )
7272
7373
@@ -77,13 +77,13 @@ class TrialResponse(BaseModel):
7777 default = None , description = "The parameter values suggested by the trial."
7878 )
7979 values : list [float ] | None = Field (
80- default = None , description = "The objective values of the trial, if available ."
80+ default = None , description = "The objective values of the trial."
8181 )
8282 user_attrs : dict [str , typing .Any ] | None = Field (
83- default = None , description = "User-defined attributes for the trial, if any ."
83+ default = None , description = "User-defined attributes for the trial."
8484 )
8585 system_attrs : dict [str , typing .Any ] | None = Field (
86- default = None , description = "System-defined attributes for the trial, if any ."
86+ default = None , description = "System-defined attributes for the trial."
8787 )
8888
8989
@@ -214,7 +214,6 @@ def get_trial_user_attrs(trial_number: int) -> TrialResponse:
214214 mcp .study ._study_id , trial_number
215215 )
216216 trial = storage .get_trial (trial_id )
217- # return f"User attributes in trial {trial_number}: {json.dumps(trial.user_attrs)}"
218217 return TrialResponse (
219218 trial_number = trial_number ,
220219 user_attrs = trial .user_attrs ,
@@ -599,6 +598,3 @@ def main() -> None:
599598
600599if __name__ == "__main__" :
601600 main ()
602-
603- mcp = OptunaMCP ("Optuna" )
604- mcp = register_tools (mcp )
0 commit comments