Another update on the <http4k MCP SDK> . We've now...
# http4k
d
Another update on the http4k MCP SDK . We've now added support for typesafe tool responses (ie. structured JSON from beans) as it's made it's way into the Draft MCP specification. What this basically means is that just by adding an example to the MCP tool definition, it will automatically generate JSON schema which the LLM can use to generate and parse Tool requests and responses. You can also use the lens system to extract and inject typesafe objects to/from Tool messages! It's out now in the latest version of http4k (v6.9.1.0) - available now in both Maven Central and the Toolbox. 🙂
http4k 1
g
This is great! Thanks... The example only has the output schema from a data class. Does the input schema still need to declare all the parameters through the
Tool.Arg
?
d
Yep. Args for input, output for output 🙃
👍🏼 1
Note that Claude and co won't actayuse the schema yet, but you can use the lenses to populate the output anyway. Note that by default (and as per Anthropic recommendation, the structured content is copied as a string into the legacy content field. This is by design for compatabiluty