@sassoftware/mcp-serverjs
Version:
A mcp server for SAS Viya
37 lines (30 loc) • 812 B
JavaScript
/*
* Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import { z } from 'zod';
import _listModels from '../toolhelpers/_listModels.js';
function findModel() {
let description = `
- **name**: The name of the model to find.
- find model myModel
`;
let spec = {
name: 'findModel',
description: description,
schema: {
'name': z.string()
},
required: ['name'],
handler: async (params) => {
// Check if the params.scenario is a string and parse it
let r = await _listModels(params);
return r;
}
}
return spec;
}
export default findModel;