@frontlinesystems/rason-mcp-server 2026.5.3 → 2026.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/index.cjs +1 -1
- package/package.json +1 -1
package/out/index.cjs
CHANGED
|
@@ -309,7 +309,7 @@ Data flow:`);for(let a of o)t.push(` ${a}`)}return{lines:t,observations:r}}func
|
|
|
309
309
|
### Structure`),t.push(...a.lines),a.observations.length>0){t.push(`
|
|
310
310
|
### Observations`);for(let x of a.observations)t.push(`- ${x}`)}let s=new Set(["modelName","modelDescription","modelType","modelSettings","comment","variables","constraints","objective","uncertainVariables","uncertainFunctions","formulas","data","datasources","datasets","estimator","transformer","fittedModel","weakLearner","preProcessor","actions","decisionTables","boxFunctions","boxIterators","typeDefs","flowName","workflowName","flowDescription","workflowDescription","engineSettings","indexSets","parameters","evaluations","contexts"]),l=Object.keys(e).filter(x=>{if(s.has(x))return!1;let S=e[x];return!(S&&typeof S=="object"&&!Array.isArray(S)&&"modelName"in S)}),d=[],p=Ke(e.engineSettings);p&&d.push(`engineSettings (${p})`);let f=Ke(e.indexSets);f&&d.push(`indexSets (${f})`);let g=Ke(e.parameters);g&&d.push(`parameters (${g})`);let y=Ke(e.evaluations);y&&d.push(`evaluations (${y})`);let v=Ke(e.contexts);return v&&d.push(`contexts (${v})`),(d.length>0||l.length>0)&&(t.push(`
|
|
311
311
|
### Other sections`),d.length>0&&t.push(d.join(" | ")),l.length>0&&t.push(`Unrecognized: ${l.join(", ")}`)),t.join(`
|
|
312
|
-
`)}function OR(e){e.registerTool("describe_model",{title:"Analyze RASON Model",description:"Analyze and classify a RASON model: reliably detect model type and subtype (optimization \u2014 LP, QP, MIP, stochastic, chance-constrained; simulation; datamining \u2014 classification, regression, clustering; calculation \u2014 decision tables, box functions; multi-stage flow), inventory and classify components (variable types, constraint types, distribution families, ML pipelines, inter-stage data flow), and identify issues (missing result requests, absent validation data, empty output sections). Provides deterministic RASON-specific analysis beyond what raw JSON inspection reveals. Call whenever the user asks about, discusses, or works with a RASON model \u2014 whether open in the editor, referenced as a file, provided inline, or stored on the RASON server.",annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0},inputSchema:I.object({model:I.record(I.string(),I.unknown()).optional().describe("The RASON model as a JSON object. Mutually exclusive with rason_model_path and name_or_id."),rason_model_path:I.string().optional().describe("Path to a file containing a RASON model. Mutually exclusive with model and name_or_id."),name_or_id:I.string().optional().describe("Name or ID of an existing model on the RASON account. The model will be fetched and analyzed. Mutually exclusive with model and rason_model_path.")})},async t=>{let{model:r,rason_model_path:i,name_or_id:n}=t,o=[r,i,n].filter(l=>l!==void 0).length;if(o===0)throw new Error("Must provide one of: model, rason_model_path, or name_or_id.");if(o>1)throw new Error("Provide only one of: model, rason_model_path, or name_or_id.");let a;if(r)a=r;else if(i){let l=await sn(i);try{a=JSON.parse(l)}catch(d){throw new Error(`Failed to parse JSON from ${i}: ${d instanceof SyntaxError?d.message:"unknown error"}. The file may contain syntax errors or incomplete JSON. Read the file directly to inspect and fix the content.`)}}else{let d=(await tt("GET",`/model/${encodeURIComponent(n)}`)).content[0].text;try{a=JSON.parse(d)}catch(p){throw new Error(`Failed to parse model response for "${n}": ${p instanceof SyntaxError?p.message:"unknown error"}. Use get_model to retrieve the raw content and inspect it directly.`)}}return{content:[{type:"text",text:tF(a)}]}})}var NR=process.env.RASON_EXAMPLES_DIR||AR.default.resolve(__dirname,"../examples"),Bi=new qm({name:"rason-mcp-server",version:"2026.5.
|
|
312
|
+
`)}function OR(e){e.registerTool("describe_model",{title:"Analyze RASON Model",description:"Analyze and classify a RASON model: reliably detect model type and subtype (optimization \u2014 LP, QP, MIP, stochastic, chance-constrained; simulation; datamining \u2014 classification, regression, clustering; calculation \u2014 decision tables, box functions; multi-stage flow), inventory and classify components (variable types, constraint types, distribution families, ML pipelines, inter-stage data flow), and identify issues (missing result requests, absent validation data, empty output sections). Provides deterministic RASON-specific analysis beyond what raw JSON inspection reveals. Call whenever the user asks about, discusses, or works with a RASON model \u2014 whether open in the editor, referenced as a file, provided inline, or stored on the RASON server.",annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0},inputSchema:I.object({model:I.record(I.string(),I.unknown()).optional().describe("The RASON model as a JSON object. Mutually exclusive with rason_model_path and name_or_id."),rason_model_path:I.string().optional().describe("Path to a file containing a RASON model. Mutually exclusive with model and name_or_id."),name_or_id:I.string().optional().describe("Name or ID of an existing model on the RASON account. The model will be fetched and analyzed. Mutually exclusive with model and rason_model_path.")})},async t=>{let{model:r,rason_model_path:i,name_or_id:n}=t,o=[r,i,n].filter(l=>l!==void 0).length;if(o===0)throw new Error("Must provide one of: model, rason_model_path, or name_or_id.");if(o>1)throw new Error("Provide only one of: model, rason_model_path, or name_or_id.");let a;if(r)a=r;else if(i){let l=await sn(i);try{a=JSON.parse(l)}catch(d){throw new Error(`Failed to parse JSON from ${i}: ${d instanceof SyntaxError?d.message:"unknown error"}. The file may contain syntax errors or incomplete JSON. Read the file directly to inspect and fix the content.`)}}else{let d=(await tt("GET",`/model/${encodeURIComponent(n)}`)).content[0].text;try{a=JSON.parse(d)}catch(p){throw new Error(`Failed to parse model response for "${n}": ${p instanceof SyntaxError?p.message:"unknown error"}. Use get_model to retrieve the raw content and inspect it directly.`)}}return{content:[{type:"text",text:tF(a)}]}})}var NR=process.env.RASON_EXAMPLES_DIR||AR.default.resolve(__dirname,"../examples"),Bi=new qm({name:"rason-mcp-server",version:"2026.5.4"},{instructions:`This MCP server connects to Frontline Systems' RASON REST API (endpoint: https://rason.net, web app: https://rason.com). RASON (RESTful Analytic Solver Object Notation) is a JSON-based modeling language created by Frontline Systems, Inc. (https://www.solver.com), the creator of the Excel Solver, for defining and solving analytical models via a REST API.
|
|
313
313
|
|
|
314
314
|
RASON model types:
|
|
315
315
|
- Optimization \u2014 linear, mixed-integer, nonlinear, conic, quadratic, stochastic; powered by Gurobi, XPRESS, MOSEK, KNITRO engines
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontlinesystems/rason-mcp-server",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.4",
|
|
4
4
|
"mcpName": "io.github.FrontlineSystems/rason-mcp-server",
|
|
5
5
|
"description": "Build, solve, and analyze RASON optimization, simulation, data science, and decision models",
|
|
6
6
|
"author": "Frontline Systems (https://www.solver.com)",
|