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

Function emit_header

src/cli/client_adapter.c:130–140  ·  view source on GitHub ↗

Shared preamble: the ownership markers and a note telling whoever opens the * file that edits inside the block are overwritten. */

Source from the content-addressed store, hash-verified

128/* Shared preamble: the ownership markers and a note telling whoever opens the
129 * file that edits inside the block are overwritten. */
130static void emit_header(adapter_sb_t *sb, const char *client) {
131 /* No markers here: cbm_text_upsert_managed_block adds them and REJECTS
132 * content that already carries them, so the body must stay marker-free. */
133 sb_append(sb, "// Generated by codebase-memory-mcp for ");
134 sb_append(sb, client);
135 sb_append(sb,
136 ".\n"
137 "// Regenerated on install/update from the MCP tool registry, so it cannot\n"
138 "// drift from the tools the server actually serves. Edits inside this block\n"
139 "// are overwritten; edit outside it, or remove the markers to take ownership.\n");
140}
141
142static void append_typebox_type(adapter_sb_t *sb, yyjson_val *val, const char *description,
143 bool include_description) {

Callers 2

cbm_client_adapter_piFunction · 0.70

Calls 1

sb_appendFunction · 0.85

Tested by

no test coverage detected