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.
56 lines (55 loc) • 1.68 kB
TypeScript
import { z } from 'zod';
import { RollTemplateService } from '../../../../ports/index.js';
import { TemplateEvaluationResult } from '../../../../use-cases/evaluate-template-use-case.js';
import { BaseTool } from './tool.js';
/**
* Input type for the evaluate template tool.
*/
type EvaluateTemplateInput = {
id: string;
count?: number;
};
/**
* Output type for the evaluate template tool.
*/
type EvaluateTemplateOutput = {
results: TemplateEvaluationResult[];
};
/**
* Tool for evaluating a roll template.
*/
export declare class EvaluateTemplateTool extends BaseTool<EvaluateTemplateInput, EvaluateTemplateOutput> {
private readonly templateService;
/**
* Creates a new EvaluateTemplateTool instance.
* @param templateService The template service to use.
*/
constructor(templateService: RollTemplateService);
/**
* Gets the name of the tool.
* @returns The tool name.
*/
protected getToolName(): string;
/**
* Gets the description of the tool.
* @returns The tool description.
*/
protected getToolDescription(): string;
/**
* Gets the input schema for the tool.
* @returns The input schema.
*/
protected getInputSchema(): z.ZodType<EvaluateTemplateInput>;
/**
* Gets the output schema for the tool.
* @returns The output schema.
*/
protected getOutputSchema(): z.ZodType<EvaluateTemplateOutput>;
/**
* Implements the tool execution logic.
* @param args The validated tool arguments.
* @returns The tool result.
*/
protected executeImpl(args: EvaluateTemplateInput): Promise<EvaluateTemplateOutput>;
}
export {};