saveToInbox
Capture thoughts, ideas, or items for later processing by saving them to an inbox within a structured knowledge base.
Instructions
Save a quick thought, idea, or item to the inbox for later processing
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The text to capture in the inbox |
Implementation Reference
- src/core/brain.ts:228-251 (handler)The actual business logic implementation of 'saveToInbox' in the Brain class, which handles updating the inbox file or creating it if it doesn't exist.
async saveToInbox(text: string): Promise<void> { const log = getLogger(); try { await this.sync.atomicUpdate( "inbox", (current) => appendInboxItem(current, text), `feat(ai): save to inbox` ); log.info("saveToInbox", { text }); } catch (err) { if (isNotFound(err)) { const content = appendInboxItem(`# Inbox\n\n`, text); await this.sync.createSection( "inbox", content, `feat(ai): create inbox with new item` ); log.info("saveToInbox: created file"); return; } throw err; } } - src/tools/inbox.ts:13-26 (registration)Registration of the 'saveToInbox' tool in the MCP server, which calls the Brain class handler.
server.registerTool( "saveToInbox", { description: "Save a quick thought, idea, or item to the inbox for later processing", inputSchema: { content: z.string().describe("The text to capture in the inbox"), }, }, toolHandler("saveToInbox", async ({ content }) => { await brain.saveToInbox(content); return { success: true }; }) );