-
Notifications
You must be signed in to change notification settings - Fork 94
feat(dbt_cli): --target argument support and get_profiles tool
#164
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
base: main
Are you sure you want to change the base?
Conversation
Add `--target` support to tools.
Prompt for target argument in dbt-cli commands.
…get names from profiles.yml
--target support to tools--target argument support & get_profiles tool to dbt_cli
--target argument support & get_profiles tool to dbt_cli --target argument support and get_profiles tool
DevonFulcher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I just had a few minor comments.
| build | ||
| compile | ||
| docs | ||
| get_profiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@b-per should be able to help get the updated diagram uploaded so it appears in the README and pypi.
|
Thanks @DevonFulcher for the feedback. I've addressed the comments, please check latest changes. |
|
Hi @hanslemm ! I have been testing the PR, and it technically works 🚀 , but I am wondering what exactly you are trying to achieve/solve with it (and/or if we should slightly update the tool). With this PR, we can
What I think is missing though is that today we can't know what is the profile used for the current dbt project. So in my case, the LLM tells me that I have 10+ profiles and several targets for each, but most of those targets won't work for my current profile. I can think of 2 ways to solve this:
What do you think? |
|
Good point, since I only have one profile in my case, I didn't think about multiple profiles + targets. The main point of this PR is allowing the MCP to run on different targets. It is nice to have the chance to tell the LLM which target it should use when reaching the MCP to run the dbt related commands. |
|
Thanks! In that case, is it OK to rename the tool to And if it sounds good to you. Let me know if you want to take care of it, otherwise, I can give it a go. |
This PR includes two main features:
--targetflag in dbt cli commands.get_profilestool, which parses theprofiles.ymlof the project and returns the available profiles + targets, including their target types (postgres, redshift, bigquery, etc.) and target database names.Tested the tool call with the prompt:
"Can you get the profiles of my project via dbt-mcp get_profiles tool?"Also did requests with different targets and ran successfully.
How to test this MCP live (example for VSCode
mcp.jsonfile)