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.
53 lines (52 loc) • 1.86 kB
TypeScript
/**
* Represents the result of a roll on a random table.
*/
export declare class RollResult {
readonly tableId: string;
readonly entryId: string;
readonly content: string;
readonly isTemplate: boolean;
readonly resolvedContent?: string | undefined;
readonly timestamp: Date;
/**
* Creates a new RollResult instance.
* @param tableId ID of the table rolled on.
* @param entryId ID of the resulting entry.
* @param content Content of the resulting entry.
* @param isTemplate Whether the content is a template.
* @param resolvedContent Optional resolved content if the original content was a template.
* @param timestamp When the roll occurred (defaults to current time).
*/
constructor(tableId: string, entryId: string, content: string, isTemplate?: boolean, resolvedContent?: string | undefined, timestamp?: Date);
/**
* Creates a RollResult from a plain object.
* @param obj The object to create the result from.
* @returns A new RollResult instance.
*/
static fromObject(obj: {
tableId: string;
entryId: string;
content: string;
isTemplate?: boolean;
resolvedContent?: string;
timestamp?: string | Date;
}): RollResult;
/**
* Converts this result to a plain object.
* @returns A plain object representation of this result.
*/
toObject(): {
tableId: string;
entryId: string;
content: string;
isTemplate: boolean;
resolvedContent?: string;
timestamp: string;
};
/**
* Creates a new RollResult with resolved content.
* @param resolvedContent The resolved content.
* @returns A new RollResult with the same properties but with resolved content.
*/
withResolvedContent(resolvedContent: string): RollResult;
}