Skip to main content
Glama
markWatchingAsRead.ts1.17 kB
import { z } from 'zod'; import { Backlog } from 'backlog-js'; import { buildToolSchema, ToolDefinition } from '../types/tool.js'; import { TranslationHelper } from '../createTranslationHelper.js'; const markWatchingAsReadSchema = buildToolSchema((t) => ({ watchId: z .number() .describe( t('TOOL_MARK_WATCHING_AS_READ_WATCH_ID', 'Watch ID to mark as read') ), })); export const MarkWatchingAsReadResultSchema = z.object({ success: z.boolean(), message: z.string(), }); export const markWatchingAsReadTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof markWatchingAsReadSchema>, (typeof MarkWatchingAsReadResultSchema)['shape'] > => { return { name: 'mark_watching_as_read', description: t( 'TOOL_MARK_WATCHING_AS_READ_DESCRIPTION', 'Mark a watch as read' ), schema: z.object(markWatchingAsReadSchema(t)), outputSchema: MarkWatchingAsReadResultSchema, handler: async ({ watchId }) => { await backlog.resetWatchingListItemAsRead(watchId); return { success: true, message: `Watch ${watchId} marked as read`, }; }, }; };

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/nulab/backlog-mcp-server'

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