Conversation
| description="Install the requirements specified in a recipe (conanfile.py or conanfile.txt)." | ||
| ) | ||
| async def install_conan_packages( | ||
| path: str = Field(description='Absolute path to the folder containing the recipe of the project or to a recipe file conanfile.txt/.py'), |
There was a problem hiding this comment.
I think we may want to default the path to . unless it's explicitly mentioned by the user?
There was a problem hiding this comment.
I had issues with this in Cursor. It tried using . for the path, but it was resolved to the conan-mcp project folder instead of the project I was editing. So I had to indicate that it should be absolute so it was more clear the project I wanted the command for.
There was a problem hiding this comment.
Makes sense, let's check what we should do with that
install_conan_packages tool
| build_profiles: list[str] = Field( | ||
| default=None, | ||
| description="List of profiles to apply to the build context. They will be applied in the order they are provided.", | ||
| ), | ||
| host_profiles: list[str] = Field( | ||
| default=None, | ||
| description="List of profiles to apply to the host context. They will be applied in the order they are provided.", | ||
| ), |
There was a problem hiding this comment.
I think we may simplify this to a single profile even if the command supports passing multiple composable profiles? It can be a bit challenging for the LLM to decide how to compose those, I think we can reduce this to the minimum.
| @@ -243,6 +243,136 @@ async def list_conan_profiles() -> list[str]: | |||
| return json.loads(raw_output) | |||
|
|
|||
|
|
|||
| @mcp.tool( | |||
There was a problem hiding this comment.
I don't know if we want to use that but I've read that you can use ToolAnnotations and set readOnlyHint to False
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Allows installing conan packages from a conanfile.
Settings and options for the host profile can be added.
There is also a 'build_missing' boolean option to build missing packages for the given configuration.