#127

Expose Types

Openctsstcopened 11mo ago

Want

I would like to abstract my registration so it's not one huge monolithic file to follow better coding practices.

Problem

It doesn't seem that there's any typing or helpers provided to do such. This leaves me re-creating the types by hand.

Solution

One of the following would solve my issue:

  • Export types that are already defined
  • Export a helper for creating a registerToolHandler

Activity

2
quuu10mo ago

which types? you have access to the whole @modelcontextprotocol/sdk types that you can import? (that we just wrap)

ctsstc10mo ago

It's been a while now, but I believe this is what I was aiming to duplicate:

I was probably getting hung up on the generics originally thinking that InputArgs was a defined type. I swore there were some types that were not exported, but at this point I could be mixing up another library in my mind since it's been a while.

In general this is what I was aiming to accomplish: