Feature/mcp cartridge deploy implementation#114
Conversation
df9304e to
daab57f
Compare
| { | ||
| name: 'cartridge_deploy', | ||
| description: '[PLACEHOLDER] Deploy cartridges to a B2C Commerce instance', | ||
| description: 'Deploy cartridges to a B2C Commerce instance via WebDAV', |
There was a problem hiding this comment.
Should we want to allow push only operation?
There was a problem hiding this comment.
@patricksullivansf Sorry for not clear on what I mean. A better description helps understand how to use the tool. Can we improve the description so that agent knows how to use this tool properly?
For example add sections for:
When to use this tool:
How to choose operation:
Efficient workflows for agents:
Rules:
Examples:
Requirements:
There was a problem hiding this comment.
You can reference the b2c-code skill for some ideas.
There was a problem hiding this comment.
updated tool description and option descriptions using claude opus suggested text based on code and jsdoc of underlying sdk.
|
|
||
| // TODO: Remove this log when implementing | ||
| // Parse options | ||
| const options: DeployOptions = { |
There was a problem hiding this comment.
We will need better tool name and description if we allow all operations.
We should also ask agent to confirm dangerous operation like delete.
There was a problem hiding this comment.
Please also update readme.md with some examples how to prompt agent to use the tool.
There was a problem hiding this comment.
It only has description for cartridge deploy but does not contain other operation provided here. Also
needs update as well.There was a problem hiding this comment.
removed the delete option.
"cartridge deploy but does not contain other operation provided here" - think this was just a misunderstanding; updated the option descriptions to make it more clear the options affect cartridge deployment and are not unique operations.
8423fe4 to
34e5517
Compare
Summary
Provides an implementation for the MCP Cartridge Deploy Tool (cartridge_deploy).
Testing
This was tested in cursor within a folder created with the commands (wonky because I don't have b2c cli installed globally):
To run the MCP we used the mcp.json below with the prompt: run the cartridge deploy tool to deploy app_custom_test
Note there were several failed attempts (see caveats below)
The cartridge successfully uploaded and can be seen ready to be deployed in https://zzrf-045.dx.commercecloud.salesforce.com/on/demandware.store/Sites-Site/default%3bapp%3d__bm_admin/ViewCodeVersion-Start?VersionID=v1
However, there are caveats worth further investigation
/opt/workspace/dev/tmp/cartridge_mcp_test/cartridgesanddw.jsonat this root. I used the simple prompt "run the cartridge deploy tool" and cursor did an excellent job of supplying reasonable default paths to the tool. However, it was unable to find the dw.json file and deployment failed./opt/workspace/dev/tmp/cartridge_mcp_testanddw.jsonat this root, cursor found the dw.json file. However, it did a terrible job of supplying default paths. On it's first run it scanned my entire home folder "~/." looking and failing to find the cartridges (note my home folder isn't even in the project path). On the third run it supplied an absolute path as the tool "directory" argument/opt/workspace/dev/tmp/cartridge_mcp_test/cartridgesand this run succeeded.code-versionalso needed to be explicitly specified in the dw.json or the tool errored out. Mentioning this because I'm not sure if we want to supply a default, or if we want the MCP tool to be able to supply (and hallucinate) a code-version.pnpm test)pnpm run format)