@sassoftware/mcp-serverjs
Version:
A mcp server for SAS Viya
42 lines (35 loc) • 1.22 kB
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 listModels() {
let description = `
The prompt must of the form
- list models.
It can be optionally followed by a limit parameter.
The limit parameter is the number of models that are returned. The default is 10.
- limit = the number of models to return. Default is 10.
- start = the index to start from. Default is 1. Use this to paginate through the list of models by specifying the start value as the previous limit + 1.
- list models and limit to 20
`;
let spec = {
name: 'listModels',
description: description,
schema: {
'limit': z.number(),
'start': z.number()
},
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 listModels;