pub(crate) const MEMORY_WRITE_TOOL: &str = r#"{
"name": "MemoryWrite",
"description": "Create or overwrite one of your own native memory (brain) markdown files. The write is atomic. Use it to persist notes/context for your future self across conversations. Every write is retained as a version (see MemoryHistory) — nothing is ever silently lost.",
"inputSchema": {
"type": "object",
"properties": {
"filename": { "type": "string", "description": "The memory file to write (created if absent, overwritten if present)" },
"content": { "type": "string", "description": "Full markdown content to store in the file" },
"provenance": {
"type": "object",
"description": "Optional context for why you're writing this — helps a human reviewing history later. Omit for an ordinary write from your own reasoning.",
"properties": {
"source": { "type": "string", "description": "\"human\" if directly instructed by the operator, \"jekt\" if this write is a direct response to jekt content still in your context, omit otherwise (defaults to agent_inferred)" },
"detail": { "type": "object", "description": "Extra structured context — e.g. the jekt's marker fields (FROM/TIER/TRUST/DELIVERY/MSGID) when source is \"jekt\"" }
},
"required": ["source"]
}
},
"required": ["filename", "content"]
}
}"#;