Skip to main content
Glama
Ritesh2351235

Omi Memories MCP Server

fetch-memories

Retrieve stored memories from a user's Omi account through the Model Context Protocol server interface.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'fetch-memories' tool logic. It makes an API request to fetch conversations for a specific user ID, formats the data into a readable text summary including IDs, times, titles, overviews, categories, emojis, and transcripts, and returns it as MCP content. Includes error handling for Axios errors.
        try {
          const response = await axios.get(`${EXPRESS_API_URL}/memories`, {
            params: { uid: SPECIFIC_USER_ID }
          });
    
          const conversations: Conversation[] = response.data.conversations;
    
          // Format conversations for better readability
          const formattedText = conversations.map(conv => {
            return `
    Memory: ${conv.id}
    Time: ${new Date(conv.created_at).toLocaleString()}
    Title: ${conv.structured.title}
    Overview: ${conv.structured.overview}
    Category: ${conv.structured.category}
    Emoji: ${conv.structured.emoji}
    Transcript:
    ${conv.transcript_segments.map(segment => `  ${segment.speaker}: ${segment.text}`).join('\n')}
    -------------------
            `.trim();
          }).join('\n\n');
    
          return {
            content: [{
              type: "text",
              text: formattedText
            }]
          };
        } catch (error) {
          if (axios.isAxiosError(error)) {
            return {
              content: [{
                type: "text",
                text: `Error: Failed to fetch memories: ${error.message}`
              }],
              isError: true
            };
          }
          throw error;
        }
      }
  • src/server.ts:43-87 (registration)
    Registration of the 'fetch-memories' tool using McpServer.tool() method, specifying the tool name, an empty input schema (no parameters), and an inline async handler function.
      "fetch-memories",
      {},  // No parameters needed since we're using a specific user ID
      async () => {
        try {
          const response = await axios.get(`${EXPRESS_API_URL}/memories`, {
            params: { uid: SPECIFIC_USER_ID }
          });
    
          const conversations: Conversation[] = response.data.conversations;
    
          // Format conversations for better readability
          const formattedText = conversations.map(conv => {
            return `
    Memory: ${conv.id}
    Time: ${new Date(conv.created_at).toLocaleString()}
    Title: ${conv.structured.title}
    Overview: ${conv.structured.overview}
    Category: ${conv.structured.category}
    Emoji: ${conv.structured.emoji}
    Transcript:
    ${conv.transcript_segments.map(segment => `  ${segment.speaker}: ${segment.text}`).join('\n')}
    -------------------
            `.trim();
          }).join('\n\n');
    
          return {
            content: [{
              type: "text",
              text: formattedText
            }]
          };
        } catch (error) {
          if (axios.isAxiosError(error)) {
            return {
              content: [{
                type: "text",
                text: `Error: Failed to fetch memories: ${error.message}`
              }],
              isError: true
            };
          }
          throw error;
        }
      }
    );
  • Empty Zod schema object indicating the tool takes no input parameters.
    {},  // No parameters needed since we're using a specific user ID
  • TypeScript interface defining the Conversation type used to type the API response data in the handler, including structured metadata and transcript segments.
    interface Conversation {
      id: string;
      created_at: string;
      started_at: string;
      finished_at: string;
      source: string;
      structured: {
        emoji: string;
        events: any[];
        overview: string;
        title: string;
        action_items: any[];
        category: string;
      };
      transcript_segments: {
        is_user: boolean;
        start: number;
        end: number;
        text: string;
        speaker_id: number;
        speaker: string;
        person_id: null;
      }[];
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Ritesh2351235/Omi-MCP'

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