Skip to content

MCP Client with BAML #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
qdrddr opened this issue Apr 21, 2025 · 2 comments
Open

MCP Client with BAML #53

qdrddr opened this issue Apr 21, 2025 · 2 comments

Comments

@qdrddr
Copy link

qdrddr commented Apr 21, 2025

You know how LLMs can get confused if you give them more than 20 tools in IDEs like Cursor (and any others obviously)? Well, it seems like even regular users will end up with hundreds or even thousands of tools because each MCP server might have a few dozen.

I think BAML could be a great solution to this problem. It could use the embedding model to help narrow down those tools to 20, so they can be used reliably.

https://github.com/hellovai/ai-that-works/tree/main/2025-03-31-large-scale-classification

Would you guys be so kind and provide a simple example of an MCP Client implementation using BAML to limit number of tools and select the lools reliably with BAML? 🤗

Copy link

linear bot commented Apr 21, 2025

@Elijas
Copy link

Elijas commented Apr 23, 2025

sounds good :slight_smile:
It would be should be really straighforward to do with baml-agents

  1. ActionRunner.actions is a list of all the registered tools in a single unified formatf (name + description + params_json_schema).
  2. Then when it's time to make a call, Create a def include(action_id: str) -> bool that returns True for all the action_id that make it to the top 20 and pass this include straight into BAML function wrapper

It would take like 10 mins to implement, I could give you the code if you'd like

But i'd love to see an official BAML approach to this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants