MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / uninstall_agent_mcp_instr

Function uninstall_agent_mcp_instr

src/cli/cli.c:9875–9898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9873 const char *instr_path;
9874} mcp_uninstall_args_t;
9875static void uninstall_agent_mcp_instr(mcp_uninstall_args_t paths, bool dry_run,
9876 int (*remove_fn)(const char *, const char *)) {
9877 const char *name = paths.name;
9878 const char *instr_path = paths.instr_path;
9879 if (!dry_run) {
9880 char binary_path[CLI_BUF_1K];
9881 cbm_agent_installed_binary_path(cbm_get_home_dir(), binary_path, sizeof(binary_path));
9882 int remove_result = remove_fn(binary_path, paths.config_path);
9883 if (remove_result < CLI_OK) {
9884 record_agent_config_error(true, name, "mcp_uninstall", paths.config_path);
9885 } else if (remove_result > CLI_OK) {
9886 printf("%s: preserved modified or foreign MCP entry\n", name);
9887 }
9888 }
9889 printf("%s: removed MCP config entry\n", name);
9890 if (instr_path) {
9891 if (!dry_run) {
9892 if (cbm_remove_instructions(instr_path) != CLI_OK) {
9893 record_agent_config_error(true, name, "instructions_uninstall", instr_path);
9894 }
9895 }
9896 printf(" removed instructions\n");
9897 }
9898}
9899
9900static void uninstall_agent_skill(const char *label, const char *skills_dir, bool dry_run) {
9901 int removed = cbm_remove_skills(skills_dir, dry_run);

Callers 3

uninstall_cli_agentsFunction · 0.85
uninstall_editor_agentsFunction · 0.85

Calls 4

cbm_get_home_dirFunction · 0.85
cbm_remove_instructionsFunction · 0.85

Tested by

no test coverage detected