Remix.run Logo
rictic 5 hours ago

I just want to say kudos for the design of the protocol. Seems inspired by https://langserver.org/ in all the right ways. Reading through it is a delight, there's so many tasteful little decisions.

One bit of constructive feedback: the TypeScript API isn't using the TypeScript type system to its fullest. For example, for tool providers, you could infer the type of a tool request handler's params from the json schema of the corresponding tool's input schema.

I guess that would be assuming that the model is doing constrained sampling correctly, such that it would never generate JSON that does not match the schema, which you might not want to bake into the reference server impl. It'd mean changes to the API too, since you'd need to connect the tool declaration and the request handler for that tool in order to connect their types.

jspahrsummers 5 hours ago | parent [-]

This is a great idea! There's also the matter of requests' result types not being automatically inferred in the SDK right now, which would be great to fix.

Could I convince you to submit a PR? We'd love to include community contributions!

filearts 2 hours ago | parent | next [-]

If you were willing to bring additional zod tooling or move to something like TypeBox (https://github.com/sinclairzx81/typebox), the json schema would be a direct derivation of the tools' input schemas in code.

dangsux 2 hours ago | parent | prev [-]

[dead]