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.
33 lines (32 loc) • 1.08 kB
TypeScript
/**
* Represents a range of values with a minimum and maximum.
* Used by TableEntry to define the range of values this entry corresponds to.
*/
export declare class Range {
readonly min: number;
readonly max: number;
/**
* Creates a new Range instance.
* @param min The minimum value of the range (inclusive).
* @param max The maximum value of the range (inclusive).
*/
constructor(min: number, max: number);
/**
* Checks if a value is within this range (inclusive).
* @param value The value to check.
* @returns True if the value is within the range, false otherwise.
*/
contains(value: number): boolean;
/**
* Returns a string representation of the range.
* @returns A string in the format "min-max".
*/
toString(): string;
/**
* Creates a Range from a string representation.
* @param rangeStr A string in the format "min-max".
* @returns A new Range instance.
* @throws Error if the string format is invalid.
*/
static fromString(rangeStr: string): Range;
}