Skip to main content
Glama
vuluu2k
by vuluu2k

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
NameRequiredDescriptionDefault
contentYesThe text to capture in the inbox

Implementation Reference

  • 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;
      }
    }
  • 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 };
      })
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vuluu2k/knowledge_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server