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.
22 lines • 686 B
JavaScript
/**
* Implementation of the RollService interface.
*/
export class RollServiceImpl {
/**
* Creates a new RollServiceImpl instance.
* @param rollOnTableUseCase The use case for rolling on tables.
*/
constructor(rollOnTableUseCase) {
this.rollOnTableUseCase = rollOnTableUseCase;
}
/**
* Rolls on a table.
* @param tableId The ID of the table to roll on.
* @param count The number of rolls to perform (default: 1).
* @returns An array of roll results.
*/
async rollOnTable(tableId, count = 1) {
return await this.rollOnTableUseCase.execute(tableId, count);
}
}
//# sourceMappingURL=roll-service-impl.js.map