Skip to content

fix: add schema constraints to MCP tool definitions#412

Open
Abiram08 wants to merge 1 commit into
sktime:mainfrom
Abiram08:fix/schema-constraints-clean
Open

fix: add schema constraints to MCP tool definitions#412
Abiram08 wants to merge 1 commit into
sktime:mainfrom
Abiram08:fix/schema-constraints-clean

Conversation

@Abiram08
Copy link
Copy Markdown

Reference Issues/PRs

Fixes #407

What does this implement/fix? Explain your changes.

Two small schema additions to server.py:

  • Added enum to the task parameter in list_estimators — without
    this, LLM clients have no way to know what values are valid and tend
    to guess wrong
  • Added minimum: 1 and maximum: 10 to cv_folds in
    evaluate_estimator — currently nothing stops a client from passing
    0 or a negative number

Both are missing constraints I noticed while reading through the tool
definitions. Small changes but they make the tools noticeably easier
to use correctly from an LLM client.

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

  • Whether the enum values I picked for task are complete — I based
    them on the sktime docs but may have missed some
  • Whether 1–10 is a sensible range for cv_folds or if the upper
    bound should be higher/removed

Any other comments?

Happy to extend this to other parameters if the approach looks good
to you — there are a few other places where bounds or enums would help.

PR checklist

For all contributions
  • I've added myself to the list of contributors.
  • I've added unit tests and made sure they pass locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON Schema constraints for task and cv_folds in MCP server

1 participant