Skip to main content
Glama

markContentSeen

Mark content items as seen after posting to track viewed YouTube videos, blog posts, and GitHub releases across sessions.

Instructions

Mark a content item as seen AFTER posting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
typeYes

Implementation Reference

  • src/server.ts:181-192 (registration)
    Registration of the 'markContentSeen' tool, including name, description, input schema, and inline execute handler that calls the markSeen helper.
    server.addTool({ name: "markContentSeen", description: "Mark a content item as seen AFTER posting.", parameters: z.object({ id: z.string(), type: z.enum(["youtube", "blog", "release"]), }), execute: async ({ id, type }) => { await markSeen(type, id); return JSON.stringify({ success: true }); }, });
  • Inline handler function for the tool that marks the content as seen using the markSeen helper and returns success.
    execute: async ({ id, type }) => { await markSeen(type, id); return JSON.stringify({ success: true }); },
  • Zod schema defining input parameters: id (string) and type (enum: youtube, blog, release).
    parameters: z.object({ id: z.string(), type: z.enum(["youtube", "blog", "release"]), }),
  • Helper function that loads last_seen.json, adds the id to the seen list for the given type if not already present, and saves the file.
    async function markSeen(type: string, id: string) { const data = await loadLastSeen(); if (!data.seen[type]) data.seen[type] = []; if (!data.seen[type].includes(id)) data.seen[type].push(id); await saveLastSeen(data); }
  • Helper to load the last_seen.json file, returning default empty seen lists if missing or invalid.
    async function loadLastSeen() { try { const raw = await fs.readFile(LAST_SEEN_FILE, "utf-8"); return JSON.parse(raw); } catch { return { seen: { youtube: [], blog: [], release: [] } }; } }

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/EbonyLouis/content-fetcher-mcp2'

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