markContentSeen
Mark content items as seen after posting to track viewing status across YouTube, blogs, and releases within the Content Fetcher MCP server.
Instructions
Mark a content item as seen AFTER posting.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| type | Yes |
Implementation Reference
- src/server.ts:188-191 (handler)The handler function for the 'markContentSeen' tool. It destructures the input parameters and calls the markSeen helper function, then returns a success JSON response.execute: async ({ id, type }) => { await markSeen(type, id); return JSON.stringify({ success: true }); },
- src/server.ts:184-187 (schema)Zod schema defining the input parameters for the markContentSeen tool: id (string) and type (enum: youtube, blog, release).parameters: z.object({ id: z.string(), type: z.enum(["youtube", "blog", "release"]), }),
- src/server.ts:181-192 (registration)Registration of the 'markContentSeen' tool using server.addTool, specifying name, description, input schema, and execute handler.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 }); }, });
- src/server.ts:60-65 (helper)Helper function that marks a content item as seen by loading the last_seen data, adding the id to the appropriate type array if not already present, and saving the updated data.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); }