UNPKG

random-tables-mcp

Version:

An MCP (Model Context Protocol) server for managing and rolling on random-table assets used in tabletop RPGs. Create, update, and roll on random tables with support for nested tables, weighted entries, and range-based results.

31 lines (30 loc) 891 B
import { TableEntry } from '../domain/index.js'; import { TableRepository } from '../ports/index.js'; /** * Use case for updating an existing random table. */ export declare class UpdateTableUseCase { private readonly repository; /** * Creates a new UpdateTableUseCase instance. * @param repository The table repository to use. */ constructor(repository: TableRepository); /** * Executes the use case. * @param id The ID of the table to update. * @param updates Object containing the updates to apply. */ execute(id: string, updates: { name?: string; description?: string; entries?: { add?: TableEntry[]; update?: { id: string; updates: Partial<Omit<TableEntry, 'id'>>; }[]; remove?: string[]; }; }): Promise<void>; }