Skip to main content
Glama
bsim0927
by bsim0927
load-range.js1.53 kB
/** * MCP Tool: Load Range */ import { RangeLoader } from '../ranges/loader.js'; export class LoadRangeTool { constructor(solverPath) { this.rangeLoader = new RangeLoader(solverPath); } /** * Load and parse a range file * @param {Object} params * @returns {Promise<Object>} */ async execute(params) { try { const { range_path } = params; if (!range_path) { return { success: false, error: 'range_path is required', error_type: 'VALIDATION_ERROR' }; } const result = await this.rangeLoader.loadRange(range_path); return { success: true, range_string: result.range_string, parsed_hands: result.parsed_hands, hand_count: result.hand_count, total_combos: result.total_combos }; } catch (error) { return { success: false, error: error.message, error_type: 'EXECUTION_ERROR' }; } } } /** * Create the MCP tool definition * @returns {Object} */ export function createLoadRangeTool() { return { name: 'load_range', description: 'Load and parse a poker range file from the TexasSolver ranges directory.', inputSchema: { type: 'object', properties: { range_path: { type: 'string', description: 'Path to range file relative to ranges/ directory (e.g., "6max_range/BTN") or absolute path' } }, required: ['range_path'] } }; } export default LoadRangeTool;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bsim0927/texas-solver-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server