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

Function uninstall_agent_mcp_instr

src/cli/cli.c:9825–9848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9823 const char *instr_path;
9824} mcp_uninstall_args_t;
9825static void uninstall_agent_mcp_instr(mcp_uninstall_args_t paths, bool dry_run,
9826 int (*remove_fn)(const char *, const char *)) {
9827 const char *name = paths.name;
9828 const char *instr_path = paths.instr_path;
9829 if (!dry_run) {
9830 char binary_path[CLI_BUF_1K];
9831 cbm_agent_installed_binary_path(cbm_get_home_dir(), binary_path, sizeof(binary_path));
9832 int remove_result = remove_fn(binary_path, paths.config_path);
9833 if (remove_result < CLI_OK) {
9834 record_agent_config_error(true, name, "mcp_uninstall", paths.config_path);
9835 } else if (remove_result > CLI_OK) {
9836 printf("%s: preserved modified or foreign MCP entry\n", name);
9837 }
9838 }
9839 printf("%s: removed MCP config entry\n", name);
9840 if (instr_path) {
9841 if (!dry_run) {
9842 if (cbm_remove_instructions(instr_path) != CLI_OK) {
9843 record_agent_config_error(true, name, "instructions_uninstall", instr_path);
9844 }
9845 }
9846 printf(" removed instructions\n");
9847 }
9848}
9849
9850static void uninstall_agent_skill(const char *label, const char *skills_dir, bool dry_run) {
9851 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