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.

45 lines (44 loc) 1.92 kB
/** * Represents a reference to another table within a template string. * Format: {{reference-title::table-id::table-name::roll-number::separator}} * Where: * - reference-title: A label for the reference * - table-id: The ID of the table to roll on * - table-name: A fallback if the ID can't be found * - roll-number: (optional) How many times to roll on the table (default: 1) * - separator: (optional) What to use when joining multiple roll results (default: ", ") */ export declare class TemplateReference { readonly title: string; readonly tableId: string; readonly tableName: string; readonly rollCount: number; readonly separator: string; /** * Creates a new TemplateReference instance. * @param title A label for the reference * @param tableId The ID of the table to roll on * @param tableName A fallback if the ID can't be found * @param rollCount How many times to roll on the table * @param separator What to use when joining multiple roll results */ constructor(title: string, tableId: string, tableName: string, rollCount?: number, separator?: string); /** * Creates a TemplateReference from a string representation. * @param refString The string representation of the reference * @returns A new TemplateReference instance */ static fromString(refString: string): TemplateReference; /** * Gets the reference string for this template reference. * Returns the short form if rollCount and separator are at default values, * otherwise returns the full form. * @returns The reference string in the appropriate format */ toString(): string; /** * Gets the full reference string for this template reference, including all parts. * @returns The reference string in the format {{title::tableId::tableName::rollCount::separator}} */ toFullString(): string; }