@sassoftware/mcp-serverjs
Version:
Demo of mcp server written in nodejs
45 lines (37 loc) • 1.15 kB
JavaScript
/*
* Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import { z } from 'zod';
import debug from 'debug';
import _scrScore from '../toolhelpers/_scrScore.js';
const log = debug('scr');
function scrScore() {
let description = `
Azure.
The input to this tool is:
- url - the uel of the deployed SCR container.
- scenario - The scenario is a key-values pairs like x=1, y=2, z=3
- if scenario is not specified, the tool will return the variables in the model
- scrscore with url for x1=1,x2=2
Use scrInfo to get the input variables for the model.
`;
let spec = {
name: 'scrScore',
description: description,
schema: {
url: z.string(),
scenario: z.string()
},
required: ['loan'],
handler: async (params) => {
let r = await _scrScore(params);
return r;
}
}
return spec;
}
export default scrScore;