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.
21 lines • 617 B
JavaScript
/**
* Use case for getting a roll template by ID.
*/
export class GetTemplateUseCase {
/**
* Creates a new GetTemplateUseCase instance.
* @param templateRepository The repository to use for template retrieval.
*/
constructor(templateRepository) {
this.templateRepository = templateRepository;
}
/**
* Executes the use case.
* @param id The ID of the template to get.
* @returns The template, or null if not found.
*/
async execute(id) {
return await this.templateRepository.getById(id);
}
}
//# sourceMappingURL=get-template-use-case.js.map