@sassoftware/sas-score-mcp-serverjs 1.0.1-9 → 1.1.1

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.
Files changed (118) hide show
  1. package/.skills/.claude-plugin/plugin.json +59 -0
  2. package/.skills/agents/sas-score-mcp-serverjs-agent.md +26 -0
  3. package/.skills/copilot-instructions.md +62 -0
  4. package/.skills/skills/README.md +204 -0
  5. package/.skills/skills/detail-strategy/SKILL.md +316 -0
  6. package/.skills/skills/find-library-server/SKILL.md +62 -0
  7. package/.skills/skills/find-resources/SKILL.md +66 -0
  8. package/.skills/skills/list-library/SKILL.md +30 -0
  9. package/.skills/skills/list-mas-job-jobdef/SKILL.md +31 -0
  10. package/.skills/skills/list-tables/SKILL.md +30 -0
  11. package/.skills/skills/read-strategy/SKILL.md +87 -0
  12. package/.skills/skills/request-routing/SKILL.md +112 -0
  13. package/.skills/skills/score-cas/SKILL.md +95 -0
  14. package/.skills/skills/score-job-jobdef/SKILL.md +58 -0
  15. package/.skills/skills/score-mas-scr/SKILL.md +58 -0
  16. package/.skills/skills/score-program/SKILL.md +59 -0
  17. package/.skills/skills/score-strategy/SKILL.md +39 -0
  18. package/README.md +96 -54
  19. package/cli.js +11 -13
  20. package/openApi.yaml +121 -121
  21. package/package.json +16 -14
  22. package/scripts/docs/SCORE_SKILL_REFERENCE.md +17 -16
  23. package/scripts/docs/TOOL_DESCRIPTION_TEMPLATE.md +3 -3
  24. package/scripts/docs/TOOL_UPDATES_SUMMARY.md +65 -63
  25. package/scripts/docs/oauth-http-transport.md +2 -2
  26. package/scripts/docs/sas-mcp-tools-reference.md +43 -32
  27. package/scripts/plot_msrp_usa.py +49 -0
  28. package/scripts/refreshtoken.js +58 -0
  29. package/scripts/runListScr.mjs +16 -0
  30. package/src/createMcpServer.js +4 -1
  31. package/src/expressMcpServer.js +47 -49
  32. package/src/oauthHandlers/authorize.js +4 -1
  33. package/src/oauthHandlers/baseUrl.js +4 -0
  34. package/src/oauthHandlers/callback.js +4 -0
  35. package/src/oauthHandlers/getMetadata.js +4 -0
  36. package/src/oauthHandlers/index.js +4 -0
  37. package/src/oauthHandlers/token.js +4 -0
  38. package/src/openApi.yaml +121 -121
  39. package/src/processHeaders.js +10 -7
  40. package/src/setupSkills.js +1 -18
  41. package/src/toolHelpers/_casScore.js +32 -0
  42. package/src/toolHelpers/_desc.js +14 -0
  43. package/src/toolHelpers/_findJob.js +12 -0
  44. package/src/toolHelpers/_findJobdef.js +10 -0
  45. package/src/toolHelpers/_findLibrary.js +11 -0
  46. package/src/toolHelpers/_findMas.js +13 -0
  47. package/src/toolHelpers/_findScr.js +36 -0
  48. package/src/toolHelpers/_findTable.js +11 -0
  49. package/src/toolHelpers/_listJobdefs.js +12 -2
  50. package/src/toolHelpers/_listJobs.js +19 -8
  51. package/src/toolHelpers/{_listModels.js → _listMas.js} +4 -4
  52. package/src/toolHelpers/_listScr.js +13 -0
  53. package/src/toolHelpers/{_scrInfo.js → _scrDescribe.js} +4 -4
  54. package/src/toolHelpers/_scrScore.js +2 -2
  55. package/src/toolHelpers/_submitCasl.js +19 -17
  56. package/src/toolHelpers/{_tableInfo.js → _tableDescribe.js} +2 -2
  57. package/src/toolHelpers/getLogonPayload.js +2 -2
  58. package/src/toolSet/casModelScore.js +93 -0
  59. package/src/toolSet/casProgramScore.js +105 -0
  60. package/src/toolSet/devaScore.js +11 -6
  61. package/src/toolSet/findJob.js +74 -59
  62. package/src/toolSet/findJobdef.js +67 -64
  63. package/src/toolSet/findLibrary.js +28 -23
  64. package/src/toolSet/findMas.js +72 -0
  65. package/src/toolSet/findScr.js +69 -0
  66. package/src/toolSet/findTable.js +34 -27
  67. package/src/toolSet/getEnv.js +57 -57
  68. package/src/toolSet/jobDescribe.js +65 -0
  69. package/src/toolSet/jobScore.js +90 -0
  70. package/src/toolSet/jobdefDescribe.js +67 -0
  71. package/src/toolSet/jobdefScore.js +85 -0
  72. package/src/toolSet/listJobdefs.js +17 -8
  73. package/src/toolSet/listJobs.js +15 -8
  74. package/src/toolSet/listLibraries.js +16 -10
  75. package/src/toolSet/listMas.js +71 -0
  76. package/src/toolSet/listScr.js +62 -0
  77. package/src/toolSet/listTables.js +78 -66
  78. package/src/toolSet/{runMacro.js → macroScore.js} +86 -82
  79. package/src/toolSet/makeTools.js +39 -25
  80. package/src/toolSet/masDescribe.js +67 -0
  81. package/src/toolSet/masScore.js +95 -0
  82. package/src/toolSet/{runProgram.js → programScore.js} +96 -93
  83. package/src/toolSet/readTable.js +43 -26
  84. package/src/toolSet/sasQuery.js +24 -18
  85. package/src/toolSet/scrDescribe.js +55 -0
  86. package/src/toolSet/scrScore.js +63 -70
  87. package/src/toolSet/searchAssets.js +1 -1
  88. package/src/toolSet/setContext.js +8 -3
  89. package/src/toolSet/superstat.js +61 -61
  90. package/src/toolSet/tableDescribe.js +65 -0
  91. package/.agents/sas-score-mcp-serverjs-agent.md +0 -58
  92. package/.instructions/copilot-instructions.md +0 -201
  93. package/.instructions/enforce-find-resource-strategy.md +0 -35
  94. package/.skills/sas-find-library-smart/SKILL.md +0 -155
  95. package/.skills/sas-find-resource-strategy/SKILL.md +0 -105
  96. package/.skills/sas-list-resource-strategy/SKILL.md +0 -124
  97. package/.skills/sas-list-tables-smart/SKILL.md +0 -128
  98. package/.skills/sas-read-and-score-strategy/SKILL.md +0 -113
  99. package/.skills/sas-read-strategy/SKILL.md +0 -154
  100. package/.skills/sas-request-classifier/SKILL.md +0 -74
  101. package/.skills/sas-score-workflow-strategy/SKILL.md +0 -314
  102. package/scripts/optimize_final.py +0 -140
  103. package/scripts/optimize_tools.py +0 -99
  104. package/scripts/setup-skills.js +0 -34
  105. package/scripts/update_descriptions.py +0 -46
  106. package/src/authpkce.js +0 -219
  107. package/src/handleGetDelete.js +0 -34
  108. package/src/handleRequest.js +0 -112
  109. package/src/hapiMcpServer.js +0 -241
  110. package/src/toolSet/findModel.js +0 -60
  111. package/src/toolSet/listModels.js +0 -56
  112. package/src/toolSet/modelInfo.js +0 -55
  113. package/src/toolSet/modelScore.js +0 -89
  114. package/src/toolSet/runCasProgram.js +0 -98
  115. package/src/toolSet/runJob.js +0 -81
  116. package/src/toolSet/runJobdef.js +0 -82
  117. package/src/toolSet/scrInfo.js +0 -52
  118. 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.0.1-9",
3
+ "version": "1.1.1",
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
- "deploy": "bash ./deploy.sh",
19
- "push2acr": "cd docker && bash ./push2acr.sh",
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
- "Agentic AI",
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
- "@sassoftware/viya-serverjs": "^0.6.3-0",
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.16.0",
68
- "uuid": "^13.0.0",
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** Route to `run-job` for job-based scoring
14
- - **jobdef** Route to `run-jobdef` for job definition-based scoring
15
- - **mas** Route to `model-score` (Model Aggregation Service)
16
- - **scr** Route to `scr-score` (Score Code Runtime container)
17
- - **sas** Route to `run-sas-program` (arbitrary SAS/SQL scoring)
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: `model-score` with model name and scenario parameters
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: `run-job` with job name and parameters
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: `run-jobdef` with jobdef name and parameters
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: `run-sas-program` with scenario parameters
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 type = "mas"
93
- scorer.job type = "job"
94
- detector.jobdef type = "jobdef"
95
- risk.scr type = "scr"
96
- predict.sas type = "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` `job`)
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] listModels.js - ✅ Already conforms
151
- - [x] findModel.js - 🔧 Needs cleanup (remove redundancy)
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
- - [ ] modelInfo.js - 🔧 Needs expansion
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
- ### Tools Fully Conforming to Template
17
+ ### ✅ Tools Fully Conforming to Template
18
18
 
19
19
  #### Major Updates (5 tools)
20
20
 
21
- 1. **findModel.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
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
- - 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
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
- - 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
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
- - 🔄 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. **modelInfo.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
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
- - 🔄 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
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. **listModels.js** - Already fully compliant
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 ( mapped params)
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" { param: value }`
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/findModel.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/modelInfo.js` - Expanded description (12 69 lines)
168
- 6. `src/toolSet/readTable.js` - Enhanced description (56 80 lines)
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
- - `tableInfo.js`
186
+ - `tableDescribe.js`
187
187
  - `program.js`
188
188
  - `sasQuery.js`
189
- - `modelScore.js`
190
- - `scrInfo.js`
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 ( mapped params)" section with 3+ real-world 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 Githu Copilot
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 teh oauth flow
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
- - [Job Management](#job-management)
15
- - [Program Execution](#program-execution)
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-models
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-model
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
- ### model-info
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
- model-info model=churnRisk
85
+ mas-describe model=churnRisk
84
86
  ```
85
87
 
86
88
  ---
87
89
 
88
- ### model-score
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
- model-score model=mycoolmodel scenario={x:1,y:2}
109
- model-score model=cancer1 scenario="age=45, sex=M, tumor=stage2"
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-info
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-info name="https://scr-host/models/loan"
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 scrInfo first to inspect expected inputs
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-info
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-info table=cars lib=Public
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
- ## Job Management
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
- ### run-job
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
- run-job myjob scenario a=10,b=20
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
- ### run-jobdef
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
- run-jobdef xyz param1=10,param2=val2
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 Execution
448
+ ## Program Models
445
449
 
446
- ### run-program
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
- ### run-macro
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"` converted to %let statements
482
- - Raw SAS: `"%let x=1; %let y=abc;"` passed through unchanged
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) × 42
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) × 42
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-models, find-model, model-info, model-score, scr-info, scr-score |
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-info, read-table, sas-query |
551
- | **Job Management** | 6 | list-jobs, find-job, job, list-jobdefs, find-jobdef, job-def |
552
- | **Program Execution** | 2 | run-program, run-macro |
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 Inspection Action
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}')