Direct tool call? #218
-
Hi- I have an agent with MCP and I'd like to be able to directly call some of it's tools rather than having an AI do it. Is that possible? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Yes, mostly, it wouldn't work with anything that requires sampling. See docs/client
|
Beta Was this translation helpful? Give feedback.
-
@JonWoodlief I've added a comprehensive example and documentation for direct tool calling in this PR! @jhaisley Thank you for the proposed solution, your example was really helpful in understanding what users need. I noticed some minor inconsistencies in the approach (due to an issue in our docs), so I created a complete example demonstrating the proper way to call MCP tools directly without an LLM. Example:
Just opened a PR #224
This should make it much easier for users to discover and use the direct tool calling functionality that's already built into mcp-use. |
Beta Was this translation helpful? Give feedback.
-
Wow! Thanks a ton |
Beta Was this translation helpful? Give feedback.
@JonWoodlief I've added a comprehensive example and documentation for direct tool calling in this PR!
@jhaisley Thank you for the proposed solution, your example was really helpful in understanding what users need. I noticed some minor inconsistencies in the approach (due to an issue in our docs), so I created a complete example demonstrating the proper way to call MCP tools directly without an LLM.
Example: