Replies: 1 comment
-
It makes no difference in terms of what happens at the protocol level. So I'd say this is entirely up to you and your coding paradigm. Personally, for non-trivial MCP servers, I believe the tool methods should focus on the contract towards the LLM and then delegate execution to a different layer of code. The schemas, names, and descriptions that work well for an LLM might not be optimal from a human perspective, so I think decoupling the LLM contract and the implementation is underused. For some methods they're simple enough that implementation can happen in the same class, but you should generally avoid forcing the implementation to have the same shape as the LLM contract, and vice versa. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
What is the best practice:
Should each tool class have one tool method or should it have multiple tool methods if they are conceptually relevant?
Beta Was this translation helpful? Give feedback.
All reactions