@sassoftware/sas-score-mcp-serverjs 1.0.1-9 → 1.1.2
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/.skills/.claude-plugin/plugin.json +59 -0
- package/.skills/agents/sas-score-mcp-serverjs-agent.md +26 -0
- package/.skills/copilot-instructions.md +62 -0
- package/.skills/skills/README.md +204 -0
- package/.skills/skills/detail-strategy/SKILL.md +316 -0
- package/.skills/skills/find-library-server/SKILL.md +62 -0
- package/.skills/skills/find-resources/SKILL.md +66 -0
- package/.skills/skills/list-library/SKILL.md +30 -0
- package/.skills/skills/list-mas-job-jobdef/SKILL.md +31 -0
- package/.skills/skills/list-tables/SKILL.md +30 -0
- package/.skills/skills/read-strategy/SKILL.md +87 -0
- package/.skills/skills/request-routing/SKILL.md +112 -0
- package/.skills/skills/score-cas/SKILL.md +95 -0
- package/.skills/skills/score-job-jobdef/SKILL.md +58 -0
- package/.skills/skills/score-mas-scr/SKILL.md +58 -0
- package/.skills/skills/score-program/SKILL.md +59 -0
- package/.skills/skills/score-strategy/SKILL.md +39 -0
- package/README.md +96 -54
- package/cli.js +11 -13
- package/openApi.yaml +121 -121
- package/package.json +16 -14
- package/scripts/docs/SCORE_SKILL_REFERENCE.md +17 -16
- package/scripts/docs/TOOL_DESCRIPTION_TEMPLATE.md +3 -3
- package/scripts/docs/TOOL_UPDATES_SUMMARY.md +65 -63
- package/scripts/docs/oauth-http-transport.md +2 -2
- package/scripts/docs/sas-mcp-tools-reference.md +43 -32
- package/scripts/plot_msrp_usa.py +49 -0
- package/scripts/refreshtoken.js +58 -0
- package/scripts/runListScr.mjs +16 -0
- package/src/createMcpServer.js +4 -1
- package/src/expressMcpServer.js +47 -49
- package/src/oauthHandlers/authorize.js +4 -1
- package/src/oauthHandlers/baseUrl.js +4 -0
- package/src/oauthHandlers/callback.js +4 -0
- package/src/oauthHandlers/getMetadata.js +4 -0
- package/src/oauthHandlers/index.js +4 -0
- package/src/oauthHandlers/token.js +4 -0
- package/src/openApi.yaml +121 -121
- package/src/processHeaders.js +10 -7
- package/src/setupSkills.js +1 -18
- package/src/toolHelpers/_casScore.js +32 -0
- package/src/toolHelpers/_desc.js +14 -0
- package/src/toolHelpers/_findJob.js +12 -0
- package/src/toolHelpers/_findJobdef.js +10 -0
- package/src/toolHelpers/_findLibrary.js +11 -0
- package/src/toolHelpers/_findMas.js +13 -0
- package/src/toolHelpers/_findScr.js +36 -0
- package/src/toolHelpers/_findTable.js +11 -0
- package/src/toolHelpers/_listJobdefs.js +12 -2
- package/src/toolHelpers/_listJobs.js +19 -8
- package/src/toolHelpers/{_listModels.js → _listMas.js} +4 -4
- package/src/toolHelpers/_listScr.js +13 -0
- package/src/toolHelpers/{_scrInfo.js → _scrDescribe.js} +4 -4
- package/src/toolHelpers/_scrScore.js +2 -2
- package/src/toolHelpers/_submitCasl.js +19 -17
- package/src/toolHelpers/{_tableInfo.js → _tableDescribe.js} +2 -2
- package/src/toolHelpers/getLogonPayload.js +2 -2
- package/src/toolSet/casModelScore.js +93 -0
- package/src/toolSet/casProgramScore.js +105 -0
- package/src/toolSet/devaScore.js +66 -61
- package/src/toolSet/findJob.js +24 -9
- package/src/toolSet/findJobdef.js +22 -19
- package/src/toolSet/findLibrary.js +73 -68
- package/src/toolSet/findMas.js +72 -0
- package/src/toolSet/findScr.js +69 -0
- package/src/toolSet/findTable.js +34 -27
- package/src/toolSet/getEnv.js +6 -6
- package/src/toolSet/jobDescribe.js +65 -0
- package/src/toolSet/jobScore.js +90 -0
- package/src/toolSet/jobdefDescribe.js +67 -0
- package/src/toolSet/jobdefScore.js +85 -0
- package/src/toolSet/listJobdefs.js +70 -61
- package/src/toolSet/listJobs.js +68 -61
- package/src/toolSet/listLibraries.js +84 -78
- package/src/toolSet/listMas.js +71 -0
- package/src/toolSet/listScr.js +62 -0
- package/src/toolSet/listTables.js +78 -66
- package/src/toolSet/{runMacro.js → macroScore.js} +86 -82
- package/src/toolSet/makeTools.js +39 -25
- package/src/toolSet/masDescribe.js +67 -0
- package/src/toolSet/masScore.js +95 -0
- package/src/toolSet/{runProgram.js → programScore.js} +21 -18
- package/src/toolSet/readTable.js +80 -63
- package/src/toolSet/sasQuery.js +83 -77
- package/src/toolSet/scrDescribe.js +55 -0
- package/src/toolSet/scrScore.js +63 -70
- package/src/toolSet/searchAssets.js +1 -1
- package/src/toolSet/setContext.js +70 -65
- package/src/toolSet/superstat.js +61 -61
- package/src/toolSet/tableDescribe.js +65 -0
- package/.agents/sas-score-mcp-serverjs-agent.md +0 -58
- package/.instructions/copilot-instructions.md +0 -201
- package/.instructions/enforce-find-resource-strategy.md +0 -35
- package/.skills/sas-find-library-smart/SKILL.md +0 -155
- package/.skills/sas-find-resource-strategy/SKILL.md +0 -105
- package/.skills/sas-list-resource-strategy/SKILL.md +0 -124
- package/.skills/sas-list-tables-smart/SKILL.md +0 -128
- package/.skills/sas-read-and-score-strategy/SKILL.md +0 -113
- package/.skills/sas-read-strategy/SKILL.md +0 -154
- package/.skills/sas-request-classifier/SKILL.md +0 -74
- package/.skills/sas-score-workflow-strategy/SKILL.md +0 -314
- package/scripts/optimize_final.py +0 -140
- package/scripts/optimize_tools.py +0 -99
- package/scripts/setup-skills.js +0 -34
- package/scripts/update_descriptions.py +0 -46
- package/src/authpkce.js +0 -219
- package/src/handleGetDelete.js +0 -34
- package/src/handleRequest.js +0 -112
- package/src/hapiMcpServer.js +0 -241
- package/src/toolSet/findModel.js +0 -60
- package/src/toolSet/listModels.js +0 -56
- package/src/toolSet/modelInfo.js +0 -55
- package/src/toolSet/modelScore.js +0 -89
- package/src/toolSet/runCasProgram.js +0 -98
- package/src/toolSet/runJob.js +0 -81
- package/src/toolSet/runJobdef.js +0 -82
- package/src/toolSet/scrInfo.js +0 -52
- package/src/toolSet/tableInfo.js +0 -58
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sassoftware/sas-score-mcp-serverjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "A mcp server for SAS Viya",
|
|
5
5
|
"author": "Deva Kumar <deva.kumar@sas.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -15,22 +15,27 @@
|
|
|
15
15
|
"test": "cd test && node",
|
|
16
16
|
"debug": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 node --inspect-brk cli.js",
|
|
17
17
|
"getViyatls": "bash ./scripts/getViyaca.sh",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"push2acr": "bash ./push2acr.sh",
|
|
19
|
+
"push2ghcr": "bash ./push2ghcr.sh",
|
|
20
20
|
"bump": "npm version prerelease",
|
|
21
|
-
"pub": "npm publish --tag dev --access public"
|
|
22
|
-
"setup-skills": "node scripts/setup-skills.js"
|
|
21
|
+
"pub": "npm publish --tag dev --access public"
|
|
23
22
|
},
|
|
24
23
|
"repository": "https://github.com/sassoftware/sas-score-mcp-serverjs",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/sassoftware/sas-score-mcp-serverjs/issues"
|
|
26
|
+
},
|
|
25
27
|
"keywords": [
|
|
26
28
|
"SAS Viya",
|
|
27
29
|
"mcp-serverjs",
|
|
28
|
-
"
|
|
30
|
+
"SAS Viya scoring",
|
|
29
31
|
"Viya actions",
|
|
30
32
|
"restaf",
|
|
31
33
|
"restafedit",
|
|
32
34
|
"restaflib",
|
|
33
|
-
"model context protocol"
|
|
35
|
+
"model context protocol",
|
|
36
|
+
"skills",
|
|
37
|
+
"agent",
|
|
38
|
+
"Agentic AI"
|
|
34
39
|
],
|
|
35
40
|
"main": "./cli.js",
|
|
36
41
|
"bin": {
|
|
@@ -42,17 +47,14 @@
|
|
|
42
47
|
"openApi.json",
|
|
43
48
|
"openApi.yaml",
|
|
44
49
|
"scripts",
|
|
45
|
-
".skills"
|
|
46
|
-
".agents",
|
|
47
|
-
".instructions"
|
|
50
|
+
".skills"
|
|
48
51
|
],
|
|
49
52
|
"dependencies": {
|
|
50
53
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
51
54
|
"@sassoftware/restaf": "^5.7.2",
|
|
52
55
|
"@sassoftware/restafedit": "^3.10.5",
|
|
53
56
|
"@sassoftware/restaflib": "^5.7.2",
|
|
54
|
-
"
|
|
55
|
-
"axios": "^1.13.2",
|
|
57
|
+
"axios": "^1.13.5",
|
|
56
58
|
"body-parser": "^2.2.1",
|
|
57
59
|
"cors": "^2.8.5",
|
|
58
60
|
"cross-env": "^10.1.0",
|
|
@@ -64,8 +66,8 @@
|
|
|
64
66
|
"node-cache": "^5.1.2",
|
|
65
67
|
"open": "^11.0.0",
|
|
66
68
|
"selfsigned": "^5.2.0",
|
|
67
|
-
"undici": "^7.
|
|
68
|
-
"uuid": "^
|
|
69
|
+
"undici": "^7.24.0",
|
|
70
|
+
"uuid": "^14.0.0",
|
|
69
71
|
"zod": "^4.2.1"
|
|
70
72
|
},
|
|
71
73
|
"devDependencies": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Score Skill Documentation
|
|
1
|
+
# Score Skill Documentation
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
The `score` skill is a generic scoring interface that automatically routes scoring requests to the appropriate tool based on the model type specified in the request.
|
|
@@ -10,11 +10,11 @@ score <name>.<type> [scenario =<key=value pairs>]
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## Supported Types
|
|
13
|
-
- **job**
|
|
14
|
-
- **jobdef**
|
|
15
|
-
- **mas**
|
|
16
|
-
- **scr**
|
|
17
|
-
- **sas**
|
|
13
|
+
- **job** — Route to `job-score` for job-based scoring
|
|
14
|
+
- **jobdef** — Route to `jobdef-score` for job definition-based scoring
|
|
15
|
+
- **mas** — Route to `mas-score` (Model Aggregation Service)
|
|
16
|
+
- **scr** — Route to `scr-score` (Score Code Runtime container)
|
|
17
|
+
- **sas** — Route to `program-score` (arbitrary SAS/SQL scoring)
|
|
18
18
|
|
|
19
19
|
## Usage Examples
|
|
20
20
|
|
|
@@ -23,21 +23,21 @@ score <name>.<type> [scenario =<key=value pairs>]
|
|
|
23
23
|
score with model churn.mas where scenario =age=45,income=60000
|
|
24
24
|
score mymodel.mas using age=45, income=60000
|
|
25
25
|
```
|
|
26
|
-
Routes to: `
|
|
26
|
+
Routes to: `mas-score` with model name and scenario parameters
|
|
27
27
|
|
|
28
28
|
### Job-Based Scoring
|
|
29
29
|
```
|
|
30
30
|
score with model monthly_scorer.job scenario =month=10,year=2025
|
|
31
31
|
score mymodel.job with month=10, year=2025
|
|
32
32
|
```
|
|
33
|
-
Routes to: `
|
|
33
|
+
Routes to: `job-score` with job name and parameters
|
|
34
34
|
|
|
35
35
|
### Job Definition Scoring
|
|
36
36
|
```
|
|
37
37
|
score fraud_detector.jobdef using amount=500,merchant=online
|
|
38
38
|
score predictions.jobdef where scenario =x=1,y=2
|
|
39
39
|
```
|
|
40
|
-
Routes to: `
|
|
40
|
+
Routes to: `jobdef-score` with jobdef name and parameters
|
|
41
41
|
|
|
42
42
|
### SCR (Score Code Runtime) Scoring
|
|
43
43
|
```
|
|
@@ -51,7 +51,7 @@ Routes to: `scr-score` with SCR URL and scenario
|
|
|
51
51
|
score predictions.sas where scenario =x=1,y=2
|
|
52
52
|
score my_scoring_code.sas using month=10,year=2025
|
|
53
53
|
```
|
|
54
|
-
Routes to: `
|
|
54
|
+
Routes to: `program-score` with scenario parameters
|
|
55
55
|
|
|
56
56
|
## Parameter Details
|
|
57
57
|
|
|
@@ -89,11 +89,11 @@ age=45,income=60000,credit=700
|
|
|
89
89
|
The skill automatically infers the type from the model name:
|
|
90
90
|
|
|
91
91
|
```
|
|
92
|
-
mymodel.mas
|
|
93
|
-
scorer.job
|
|
94
|
-
detector.jobdef
|
|
95
|
-
risk.scr
|
|
96
|
-
predict.sas
|
|
92
|
+
mymodel.mas → type = "mas"
|
|
93
|
+
scorer.job → type = "job"
|
|
94
|
+
detector.jobdef → type = "jobdef"
|
|
95
|
+
risk.scr → type = "scr"
|
|
96
|
+
predict.sas → type = "sas"
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
If the type is not specified in the model name or as a parameter, the skill will ask for clarification:
|
|
@@ -134,9 +134,10 @@ All responses include metadata indicating which tool was invoked.
|
|
|
134
134
|
|
|
135
135
|
The skill is defined in `src/toolSet/scoreSkill.js` and:
|
|
136
136
|
- Parses model name to extract type
|
|
137
|
-
- Normalizes type names (e.g., `jobs`
|
|
137
|
+
- Normalizes type names (e.g., `jobs` → `job`)
|
|
138
138
|
- Routes to appropriate tool handler
|
|
139
139
|
- Attaches scoring metadata to response
|
|
140
140
|
- Handles errors from backend tools
|
|
141
141
|
|
|
142
142
|
The skill is automatically registered in `makeTools.js` and available alongside other MCP tools.
|
|
143
|
+
|
|
@@ -147,11 +147,11 @@ Before marking a tool as conforming to the template:
|
|
|
147
147
|
|
|
148
148
|
## Tools Updated to Template
|
|
149
149
|
|
|
150
|
-
- [x]
|
|
151
|
-
- [x]
|
|
150
|
+
- [x] listMas.js - ✅ Already conforms
|
|
151
|
+
- [x] findMas.js - 🔧 Needs cleanup (remove redundancy)
|
|
152
152
|
- [ ] deval.js - 🔧 Needs major expansion
|
|
153
153
|
- [ ] devaScore.js - 🔧 Needs expansion
|
|
154
154
|
- [ ] setContext.js - 🔧 Needs expansion
|
|
155
|
-
- [ ]
|
|
155
|
+
- [ ] masDescribe.js - 🔧 Needs expansion
|
|
156
156
|
- [ ] readTable.js - ✅ Mostly conforms (minor tweaks)
|
|
157
157
|
- [ ] ... (other tools)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Tool Description Standardization - Update Summary
|
|
1
|
+
# Tool Description Standardization - Update Summary
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
All tool descriptions have been standardized to follow a consistent template format. This ensures:
|
|
@@ -14,72 +14,72 @@ See `TOOL_DESCRIPTION_TEMPLATE.md` for the complete template specification and v
|
|
|
14
14
|
|
|
15
15
|
## Tools Updated
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### ✅ Tools Fully Conforming to Template
|
|
18
18
|
|
|
19
19
|
#### Major Updates (5 tools)
|
|
20
20
|
|
|
21
|
-
1. **
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
21
|
+
1. **findMas.js** - Cleaned up and standardized
|
|
22
|
+
- âœ‚ï¸ Removed redundant JSON metadata object
|
|
23
|
+
- âœ‚ï¸ Removed confusing/error lines (41-47) that listed find lib/table/job incorrectly
|
|
24
|
+
- ✅ Now has all required template sections
|
|
25
|
+
- ✅ Clear LLM invocation guidance
|
|
26
26
|
|
|
27
27
|
2. **deval.js** - Expanded from 2 lines to comprehensive format
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
28
|
+
- âž• Added "LLM Invocation Guidance" section with 4 use cases
|
|
29
|
+
- âž• Added "Do NOT use this tool for" section (4 items)
|
|
30
|
+
- âž• Added clear "Purpose" statement
|
|
31
|
+
- âž• Added "Parameters" documentation
|
|
32
|
+
- âž• Added "Response Contract" describing return format
|
|
33
|
+
- âž• Added "Disambiguation & Clarification" section
|
|
34
|
+
- âž• Added 3 real-world "Examples" with parameter mappings
|
|
35
|
+
- âž• Added "Negative Examples" section
|
|
36
|
+
- âž• Added "Related Tools" section
|
|
37
37
|
|
|
38
38
|
3. **setContext.js** - Expanded with comprehensive guidance
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
39
|
+
- âž• Added "LLM Invocation Guidance" section with 4 use cases
|
|
40
|
+
- âž• Added "Do NOT use" section
|
|
41
|
+
- âž• Added detailed "Purpose" explaining session context switching
|
|
42
|
+
- âž• Enhanced "Parameters" with real server examples
|
|
43
|
+
- âž• Added "Response Contract" with detailed structure
|
|
44
|
+
- âž• Added "Disambiguation & Clarification" for edge cases
|
|
45
|
+
- âž• Added 4 real-world "Examples" with parameter mappings
|
|
46
|
+
- âž• Added "Negative Examples" section
|
|
47
|
+
- âž• Added "Related Tools" section
|
|
48
48
|
|
|
49
49
|
4. **devaScore.js** - Reformatted with template structure
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
5. **
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
50
|
+
- 🔄 Restructured from instruction-heavy to template format
|
|
51
|
+
- âž• Added "LLM Invocation Guidance" section
|
|
52
|
+
- âž• Added "Do NOT use" section
|
|
53
|
+
- âž• Added clear parameter documentation
|
|
54
|
+
- âž• Added "Response Contract" section
|
|
55
|
+
- âž• Added "Examples" and "Negative Examples" sections
|
|
56
|
+
- âž• Added "Notes" section explaining left-to-right fold
|
|
57
|
+
|
|
58
|
+
5. **masDescribe.js** - Expanded with comprehensive structure
|
|
59
|
+
- âž• Added "LLM Invocation Guidance" with 4 use cases
|
|
60
|
+
- âž• Added "Do NOT use" section
|
|
61
|
+
- âž• Enhanced "Purpose" statement
|
|
62
|
+
- âž• Added detailed "Response Contract" describing metadata fields
|
|
63
|
+
- âž• Added "Disambiguation & Clarification" section
|
|
64
|
+
- âž• Added 4 real-world "Examples" with parameter mappings
|
|
65
|
+
- âž• Added "Negative Examples" section
|
|
66
|
+
- âž• Added "Related Tools" showing workflow chain
|
|
67
67
|
|
|
68
68
|
#### Moderate Updates (1 tool)
|
|
69
69
|
|
|
70
70
|
6. **readTable.js** - Enhanced to fully conform to template
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
71
|
+
- 🔄 Restructured sections for template consistency
|
|
72
|
+
- âž• Enhanced "LLM Invocation Guidance" with 5 specific use cases
|
|
73
|
+
- âž• Improved "Do NOT use" section with explanation
|
|
74
|
+
- âž• Clarified "Parameters" format and added constraints
|
|
75
|
+
- 🔄 Renamed "Output" to "Response Contract" per template
|
|
76
|
+
- âž• Added "Pagination & Filtering" section with examples
|
|
77
|
+
- âž• Enhanced "Examples" with 5 detailed parameter mappings
|
|
78
|
+
- âž• Added comprehensive "Related Tools" section
|
|
79
79
|
|
|
80
80
|
#### Already Conforming (1 tool)
|
|
81
81
|
|
|
82
|
-
7. **
|
|
82
|
+
7. **listMas.js** - ✅ Already fully compliant
|
|
83
83
|
- Already had comprehensive template format
|
|
84
84
|
- No changes needed
|
|
85
85
|
|
|
@@ -110,11 +110,11 @@ Clear list of what NOT to do and which tools to use instead. Prevents misuse.
|
|
|
110
110
|
- How to clarify ambiguous requests
|
|
111
111
|
- Exact clarification questions to ask
|
|
112
112
|
|
|
113
|
-
### 7. Examples (
|
|
113
|
+
### 7. Examples (→ mapped params)
|
|
114
114
|
- Real-world user phrases
|
|
115
115
|
- Parameter mappings shown
|
|
116
116
|
- Includes various parameter combinations
|
|
117
|
-
- Format: `"user input"
|
|
117
|
+
- Format: `"user input" → { param: value }`
|
|
118
118
|
|
|
119
119
|
### 8. Negative Examples (should NOT call toolName)
|
|
120
120
|
- Common mistakes showing what NOT to do
|
|
@@ -160,12 +160,12 @@ Clear list of what NOT to do and which tools to use instead. Prevents misuse.
|
|
|
160
160
|
|
|
161
161
|
## Files Modified
|
|
162
162
|
|
|
163
|
-
1. `src/toolSet/
|
|
164
|
-
2. `src/toolSet/deval.js` - Expanded description (2
|
|
165
|
-
3. `src/toolSet/setContext.js` - Expanded description (9
|
|
166
|
-
4. `src/toolSet/devaScore.js` - Reformatted (12
|
|
167
|
-
5. `src/toolSet/
|
|
168
|
-
6. `src/toolSet/readTable.js` - Enhanced description (56
|
|
163
|
+
1. `src/toolSet/findMas.js` - Cleaned up redundancy
|
|
164
|
+
2. `src/toolSet/deval.js` - Expanded description (2 → 47 lines)
|
|
165
|
+
3. `src/toolSet/setContext.js` - Expanded description (9 → 60 lines)
|
|
166
|
+
4. `src/toolSet/devaScore.js` - Reformatted (12 → 54 lines)
|
|
167
|
+
5. `src/toolSet/masDescribe.js` - Expanded description (12 → 69 lines)
|
|
168
|
+
6. `src/toolSet/readTable.js` - Enhanced description (56 → 80 lines)
|
|
169
169
|
|
|
170
170
|
## Files Created
|
|
171
171
|
|
|
@@ -183,11 +183,11 @@ Consider updating remaining tools in the toolSet directory to match this templat
|
|
|
183
183
|
- `findTable.js`
|
|
184
184
|
- `job.js`
|
|
185
185
|
- `jobdef.js`
|
|
186
|
-
- `
|
|
186
|
+
- `tableDescribe.js`
|
|
187
187
|
- `program.js`
|
|
188
188
|
- `sasQuery.js`
|
|
189
|
-
- `
|
|
190
|
-
- `
|
|
189
|
+
- `masScore.js`
|
|
190
|
+
- `scrDescribe.js`
|
|
191
191
|
- `scrScore.js`
|
|
192
192
|
- And any others...
|
|
193
193
|
|
|
@@ -201,8 +201,10 @@ To verify a tool conforms to the template, check:
|
|
|
201
201
|
- [ ] Has "Parameters" section with type, default, and description for each param
|
|
202
202
|
- [ ] Has "Response Contract" describing the return format
|
|
203
203
|
- [ ] Has "Disambiguation & Clarification" section for edge cases
|
|
204
|
-
- [ ] Has "Examples (
|
|
204
|
+
- [ ] Has "Examples (→ mapped params)" section with 3+ real-world examples
|
|
205
205
|
- [ ] Has "Negative Examples (should NOT call...)" section with what NOT to do
|
|
206
206
|
- [ ] Has "Related Tools" section showing workflow context
|
|
207
207
|
- [ ] Uses proper markdown formatting (## headers, - bullets, `code`)
|
|
208
208
|
- [ ] Consistent formatting and tone throughout
|
|
209
|
+
|
|
210
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
TBD
|
|
7
7
|
|
|
8
|
-
## VSCODE
|
|
8
|
+
## VSCODE Github Copilot
|
|
9
9
|
|
|
10
10
|
### Scenario:
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ It appears that the / at the end of the redirect URI is important]
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
### pkce clientid when mcp server does
|
|
38
|
+
### pkce clientid when mcp server does the oauth flow
|
|
39
39
|
|
|
40
40
|
```js
|
|
41
41
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SAS MCP Server Tools Reference
|
|
1
|
+
# SAS MCP Server Tools Reference
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
@@ -11,8 +11,10 @@ All tools are registered as sas-score-<toolname>
|
|
|
11
11
|
- [Model Management & Scoring](#model-management--scoring)
|
|
12
12
|
- [Library Management](#library-management)
|
|
13
13
|
- [Table Operations](#table-operations)
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
14
|
+
- [Jobs Model](#jobs-model)
|
|
15
|
+
- [Jobdef Models](#jobdef-models)
|
|
16
|
+
- [Program Models](#program-models)
|
|
17
|
+
- [Macro Models](#macro-models)
|
|
16
18
|
- [Context & Configuration](#context--configuration)
|
|
17
19
|
- [Utility Tools](#utility-tools)
|
|
18
20
|
|
|
@@ -20,7 +22,7 @@ All tools are registered as sas-score-<toolname>
|
|
|
20
22
|
|
|
21
23
|
## Model Management & Scoring
|
|
22
24
|
|
|
23
|
-
### list-
|
|
25
|
+
### list-mas
|
|
24
26
|
|
|
25
27
|
Enumerate models published to MAS (Model Aggregation Service).
|
|
26
28
|
|
|
@@ -42,7 +44,7 @@ list 25 models
|
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
45
|
-
### find-
|
|
47
|
+
### find-mas
|
|
46
48
|
|
|
47
49
|
Locate a specific model deployed to MAS.
|
|
48
50
|
|
|
@@ -61,7 +63,7 @@ find model myModel
|
|
|
61
63
|
|
|
62
64
|
---
|
|
63
65
|
|
|
64
|
-
###
|
|
66
|
+
### mas-describe
|
|
65
67
|
|
|
66
68
|
Retrieve detailed metadata for a deployed model including input/output variables, data types, and constraints.
|
|
67
69
|
|
|
@@ -80,12 +82,12 @@ Retrieve detailed metadata for a deployed model including input/output variables
|
|
|
80
82
|
|
|
81
83
|
**Example:**
|
|
82
84
|
```
|
|
83
|
-
|
|
85
|
+
mas-describe model=churnRisk
|
|
84
86
|
```
|
|
85
87
|
|
|
86
88
|
---
|
|
87
89
|
|
|
88
|
-
###
|
|
90
|
+
### mas-score
|
|
89
91
|
|
|
90
92
|
Score user-supplied scenario data using a MAS-published model.
|
|
91
93
|
|
|
@@ -105,13 +107,13 @@ Score user-supplied scenario data using a MAS-published model.
|
|
|
105
107
|
|
|
106
108
|
**Example:**
|
|
107
109
|
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
mas-score model=mycoolmodel scenario={x:1,y:2}
|
|
111
|
+
mas-score model=cancer1 scenario="age=45, sex=M, tumor=stage2"
|
|
110
112
|
```
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
114
|
-
### scr-
|
|
116
|
+
### scr-describe
|
|
115
117
|
|
|
116
118
|
Return input/output schema and metadata for an SCR (Score Code Runtime) model.
|
|
117
119
|
|
|
@@ -124,7 +126,7 @@ Return input/output schema and metadata for an SCR (Score Code Runtime) model.
|
|
|
124
126
|
|
|
125
127
|
**Example:**
|
|
126
128
|
```
|
|
127
|
-
scr-
|
|
129
|
+
scr-describe name="https://scr-host/models/loan"
|
|
128
130
|
```
|
|
129
131
|
|
|
130
132
|
---
|
|
@@ -138,7 +140,7 @@ Score a scenario using an SCR container model.
|
|
|
138
140
|
- `scenario` (string | object | array, optional): Input values
|
|
139
141
|
|
|
140
142
|
**Usage:**
|
|
141
|
-
- Run
|
|
143
|
+
- Run scrDescribe first to inspect expected inputs
|
|
142
144
|
- Omit scenario to get model metadata
|
|
143
145
|
|
|
144
146
|
**Example:**
|
|
@@ -243,7 +245,7 @@ find table cars in sashelp in sas
|
|
|
243
245
|
|
|
244
246
|
---
|
|
245
247
|
|
|
246
|
-
### table-
|
|
248
|
+
### table-describe
|
|
247
249
|
|
|
248
250
|
Return metadata about a table including columns, types, and statistics.
|
|
249
251
|
|
|
@@ -262,7 +264,7 @@ Return metadata about a table including columns, types, and statistics.
|
|
|
262
264
|
|
|
263
265
|
**Example:**
|
|
264
266
|
```
|
|
265
|
-
table-
|
|
267
|
+
table-describe table=cars lib=Public
|
|
266
268
|
describe table air in lib sashelp on sas server
|
|
267
269
|
```
|
|
268
270
|
|
|
@@ -320,7 +322,7 @@ sasquery table=mylib.students query="How many students in each year as percentag
|
|
|
320
322
|
|
|
321
323
|
---
|
|
322
324
|
|
|
323
|
-
##
|
|
325
|
+
## Jobs Model
|
|
324
326
|
|
|
325
327
|
### list-jobs
|
|
326
328
|
|
|
@@ -363,7 +365,7 @@ find job cars_job_v4
|
|
|
363
365
|
|
|
364
366
|
---
|
|
365
367
|
|
|
366
|
-
###
|
|
368
|
+
### job-score
|
|
367
369
|
|
|
368
370
|
Execute a job on a SAS Viya server.
|
|
369
371
|
|
|
@@ -377,12 +379,14 @@ Execute a job on a SAS Viya server.
|
|
|
377
379
|
**Example:**
|
|
378
380
|
```
|
|
379
381
|
run job xyz param1=10,param2=val2
|
|
380
|
-
|
|
382
|
+
job-score myjob scenario a=10,b=20
|
|
381
383
|
job myjob scenario a=10,b=20
|
|
382
384
|
```
|
|
383
385
|
|
|
384
386
|
---
|
|
385
387
|
|
|
388
|
+
## Jobdef Models
|
|
389
|
+
|
|
386
390
|
### list-jobdefs
|
|
387
391
|
|
|
388
392
|
Enumerate SAS Viya job definition assets.
|
|
@@ -422,7 +426,7 @@ find jobdef metricsRefresh
|
|
|
422
426
|
|
|
423
427
|
---
|
|
424
428
|
|
|
425
|
-
###
|
|
429
|
+
### jobdef-score
|
|
426
430
|
|
|
427
431
|
Execute a job definition on a SAS Viya server.
|
|
428
432
|
|
|
@@ -435,15 +439,15 @@ Execute a job definition on a SAS Viya server.
|
|
|
435
439
|
|
|
436
440
|
**Example:**
|
|
437
441
|
```
|
|
438
|
-
|
|
442
|
+
jobdef-score xyz param1=10,param2=val2
|
|
439
443
|
jobdef myjobdef scenario a=10,b=20
|
|
440
444
|
```
|
|
441
445
|
|
|
442
446
|
---
|
|
443
447
|
|
|
444
|
-
## Program
|
|
448
|
+
## Program Models
|
|
445
449
|
|
|
446
|
-
###
|
|
450
|
+
### program-score
|
|
447
451
|
|
|
448
452
|
Execute arbitrary SAS code or stored programs on a SAS Viya server.
|
|
449
453
|
|
|
@@ -469,7 +473,9 @@ program sample folder=/Public/models scenario="name='John', age=45" output=a
|
|
|
469
473
|
|
|
470
474
|
---
|
|
471
475
|
|
|
472
|
-
|
|
476
|
+
## Macro Models
|
|
477
|
+
|
|
478
|
+
### macro-score
|
|
473
479
|
|
|
474
480
|
Submit and execute a SAS macro on a SAS Viya server.
|
|
475
481
|
|
|
@@ -478,8 +484,8 @@ Submit and execute a SAS macro on a SAS Viya server.
|
|
|
478
484
|
- `scenario` (string, optional): Parameters or SAS setup code
|
|
479
485
|
|
|
480
486
|
**Scenario formats:**
|
|
481
|
-
- Comma-separated: `"x=1, y=abc"`
|
|
482
|
-
- Raw SAS: `"%let x=1; %let y=abc;"`
|
|
487
|
+
- Comma-separated: `"x=1, y=abc"` → converted to %let statements
|
|
488
|
+
- Raw SAS: `"%let x=1; %let y=abc;"` → passed through unchanged
|
|
483
489
|
|
|
484
490
|
**Example:**
|
|
485
491
|
```
|
|
@@ -520,14 +526,14 @@ Use this to verify that the mcp server is up and running.
|
|
|
520
526
|
|
|
521
527
|
### deva-score
|
|
522
528
|
|
|
523
|
-
Compute a numeric score based on two input values using the formula: (a + b)
|
|
529
|
+
Compute a numeric score based on two input values using the formula: (a + b) × 42
|
|
524
530
|
|
|
525
531
|
**Parameters:**
|
|
526
532
|
- `a` (number, required): First numeric input
|
|
527
533
|
- `b` (number, required): Second numeric input
|
|
528
534
|
|
|
529
535
|
**Returns:**
|
|
530
|
-
- Numeric result: (a + b)
|
|
536
|
+
- Numeric result: (a + b) × 42
|
|
531
537
|
|
|
532
538
|
**Usage:**
|
|
533
539
|
- "Calculate deva score for 5 and 10"
|
|
@@ -545,11 +551,13 @@ deva-score a=1 b=2 // returns 126
|
|
|
545
551
|
|
|
546
552
|
| Category | Tool Count | Tools |
|
|
547
553
|
|----------|-----------|-------|
|
|
548
|
-
| **Model Management** | 6 | list-
|
|
554
|
+
| **Model Management** | 6 | list-mas, find-mas, mas-describe, mas-score, scr-describe, scr-score |
|
|
549
555
|
| **Library Management** | 2 | list-libraries, find-library |
|
|
550
|
-
| **Table Operations** | 5 | list-tables, find-table, table-
|
|
551
|
-
| **
|
|
552
|
-
| **
|
|
556
|
+
| **Table Operations** | 5 | list-tables, find-table, table-describe, read-table, sas-query |
|
|
557
|
+
| **Jobs Model** | 3 | list-jobs, find-job, job-score |
|
|
558
|
+
| **Jobdef Models** | 3 | list-jobdefs, find-jobdef, jobdef-score |
|
|
559
|
+
| **Program Models** | 1 | program-score |
|
|
560
|
+
| **Macro Models** | 1 | macro-score |
|
|
553
561
|
| **Context & Config** | 1 | set-context |
|
|
554
562
|
| **Utilities** | 1 | deva-score |
|
|
555
563
|
| **Total** | **24** | |
|
|
@@ -558,7 +566,7 @@ deva-score a=1 b=2 // returns 126
|
|
|
558
566
|
|
|
559
567
|
## Common Patterns
|
|
560
568
|
|
|
561
|
-
### Discovery
|
|
569
|
+
### Discovery → Inspection → Action
|
|
562
570
|
|
|
563
571
|
1. **List** tools to discover available resources
|
|
564
572
|
2. **Find** tools to locate specific items
|
|
@@ -598,3 +606,6 @@ Tools accepting scenarios support multiple formats:
|
|
|
598
606
|
|
|
599
607
|
*Document generated for @sassoftware/mcp-serverjs*
|
|
600
608
|
*Last updated: December 2024*
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import matplotlib
|
|
2
|
+
matplotlib.use('Agg')
|
|
3
|
+
import matplotlib.pyplot as plt
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
data = [
|
|
7
|
+
("Cadillac", 50474.375),
|
|
8
|
+
("Hummer", 49995.0),
|
|
9
|
+
("Lincoln", 42875.555556),
|
|
10
|
+
("Buick", 30537.777778),
|
|
11
|
+
("GMC", 29560.5),
|
|
12
|
+
("Mercury", 27972.777778),
|
|
13
|
+
("Chrysler", 27252.0),
|
|
14
|
+
("Chevrolet", 26587.037037),
|
|
15
|
+
("Dodge", 26253.846154),
|
|
16
|
+
("Jeep", 24518.333333),
|
|
17
|
+
("Pontiac", 24156.363636),
|
|
18
|
+
("Ford", 24015.869565),
|
|
19
|
+
("Oldsmobile", 23763.333333),
|
|
20
|
+
("Saturn", 17234.375),
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
# Sort by value descending
|
|
24
|
+
data.sort(key=lambda x: x[1], reverse=True)
|
|
25
|
+
makes = [d[0] for d in data]
|
|
26
|
+
values = [d[1] for d in data]
|
|
27
|
+
|
|
28
|
+
out_dir = Path('outputs')
|
|
29
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
30
|
+
out_file = out_dir / 'make_avg_msrp_usa.png'
|
|
31
|
+
|
|
32
|
+
plt.figure(figsize=(12, 6))
|
|
33
|
+
bars = plt.bar(makes, values, color='tab:blue')
|
|
34
|
+
plt.title('Average MSRP by Make (Origin = USA)')
|
|
35
|
+
plt.ylabel('Average MSRP')
|
|
36
|
+
plt.xticks(rotation=45, ha='right')
|
|
37
|
+
plt.tight_layout()
|
|
38
|
+
|
|
39
|
+
# Annotate bars
|
|
40
|
+
for bar in bars:
|
|
41
|
+
height = bar.get_height()
|
|
42
|
+
plt.annotate(f'{height:,.0f}',
|
|
43
|
+
xy=(bar.get_x() + bar.get_width() / 2, height),
|
|
44
|
+
xytext=(0, 3),
|
|
45
|
+
textcoords='offset points',
|
|
46
|
+
ha='center', va='bottom', fontsize=8)
|
|
47
|
+
|
|
48
|
+
plt.savefig(out_file)
|
|
49
|
+
print(f'Plot saved to {out_file}')
|