Skip to content

v0.2.4

Choose a tag to compare

@Mark007-R Mark007-R released this 23 Sep 07:46
· 175 commits to main since this release
266e98c

Closes the v0.2 milestone: richer schemas on both sides of a tool call, and a way to launch a server without writing a __main__ block.

Added

  • Parameter descriptions from Annotated[T, "description"], alongside the docstring's Args: section. The annotation sits next to the parameter, so it cannot quietly stop applying when the parameter is renamed. Where both exist, the annotation wins.
  • Structured results. A tool whose return annotation describes a JSON object now publishes an outputSchema in tools/list and answers with structuredContent next to the text block the spec keeps for older clients. Results are validated against the schema before they are sent.
  • Optional Pydantic v2 models as whole parameters and return types, via the new easy-mcp-kit[pydantic] extra. The model's own schema is advertised — constraints included — and Pydantic does the validating, so every violation is reported rather than the first. The library never imports Pydantic; models are recognised by duck typing.
  • easy-mcp run my_tools:server, which imports a module and serves the server it defines. --transport picks stdio or HTTP per host; --host, --port and --debug override the module's own settings only when given.

Fixed

  • An Annotated parameter's description no longer vanishes from the generated schema. get_type_hints() strips annotation metadata unless asked not to, so the text was silently dropped and clients saw an undocumented parameter.

Everything is backwards compatible: a tool written against 0.1 registers and behaves exactly as before. Full detail in CHANGELOG.md.

pip install easy-mcp-kit==0.2.4

What's Changed

  • Refresh the demo video and code snapshots for 0.2.3 by @Mark007-R in #22
  • Harden supply chain: pin CI actions, add dependabot and lockfile by @Mark007-R in #23
  • Remove Dependabot config by @Mark007-R in #26
  • Read parameter descriptions from Annotated[T, "description"] by @Mark007-R in #27
  • Publish outputSchema and answer with structuredContent by @Mark007-R in #28
  • Accept Pydantic models as whole parameters and return types by @Mark007-R in #29
  • Add an easy-mcp run command for launching a module by @Mark007-R in #30
  • Release 0.2.4 by @Mark007-R in #31

Full Changelog: v0.2.3...v0.2.4