feat: add prompt instructions into tool docstring #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
根据fastmcp的文档 https://gofastmcp.com/servers/tools, 工具装饰器会将相关的函数的docstring自动转成工具的描述,附加在大模型的调用promt中。
原来的docstring是面向于用户及开发者的函数描述,对于模型来说指导意义不大,且浪费模型调用token。
这个PR将原本README中推荐加入到cursor rule的描述(同样也会加入到大模型的调用promt中)加到了工具的docstring中,这样: