@sassoftware/sas-score-mcp-serverjs 1.0.1-30 → 1.0.1-32

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 (50) hide show
  1. package/.skills/agents/sas-score-mcp-serverjs-agent.md +1 -1
  2. package/.skills/copilot-instructions.md +57 -26
  3. package/.skills/skills/detail-strategy/SKILL.md +95 -49
  4. package/.skills/skills/find-resources/SKILL.md +38 -31
  5. package/.skills/skills/list-resource/SKILL.md +93 -33
  6. package/.skills/skills/request-routing/SKILL.md +9 -4
  7. package/.skills/skills/score-strategy/SKILL.md +21 -3
  8. package/README.md +62 -43
  9. package/openApi.yaml +121 -121
  10. package/package.json +7 -5
  11. package/scripts/docs/oauth-http-transport.md +2 -2
  12. package/scripts/plot_msrp_usa.py +49 -0
  13. package/scripts/refreshtoken.js +57 -57
  14. package/src/createMcpServer.js +0 -1
  15. package/src/openApi.yaml +121 -121
  16. package/src/toolHelpers/_findJob.js +12 -0
  17. package/src/toolHelpers/_findJobdef.js +10 -0
  18. package/src/toolHelpers/_findLibrary.js +10 -0
  19. package/src/toolHelpers/_findMas.js +12 -0
  20. package/src/toolHelpers/_findTable.js +10 -0
  21. package/src/toolHelpers/_listJobs.js +2 -2
  22. package/src/toolHelpers/{_listModels.js → _listMas.js} +4 -4
  23. package/src/toolSet/devaScore.js +61 -61
  24. package/src/toolSet/findJob.js +2 -1
  25. package/src/toolSet/findJobdef.js +2 -2
  26. package/src/toolSet/findLibrary.js +68 -68
  27. package/src/toolSet/findMas.js +59 -0
  28. package/src/toolSet/findTable.js +2 -2
  29. package/src/toolSet/jobInfo.js +59 -0
  30. package/src/toolSet/jobdefInfo.js +59 -0
  31. package/src/toolSet/listJobdefs.js +61 -61
  32. package/src/toolSet/listJobs.js +61 -61
  33. package/src/toolSet/listLibraries.js +78 -78
  34. package/src/toolSet/{listModels.js → listMas.js} +61 -56
  35. package/src/toolSet/listTables.js +66 -66
  36. package/src/toolSet/makeTools.js +21 -12
  37. package/src/toolSet/{modelInfo.js → masInfo.js} +12 -12
  38. package/src/toolSet/{modelScore.js → masScore.js} +3 -3
  39. package/src/toolSet/readTable.js +63 -63
  40. package/src/toolSet/runMacro.js +82 -82
  41. package/src/toolSet/sasQuery.js +77 -77
  42. package/src/toolSet/setContext.js +65 -65
  43. package/src/toolSet/superstat.js +61 -61
  44. package/src/toolSet/tableInfo.js +58 -58
  45. package/scripts/optimize_final.py +0 -140
  46. package/scripts/optimize_tools.py +0 -99
  47. package/scripts/setup-skills.js +0 -34
  48. package/scripts/token.txt +0 -1
  49. package/scripts/update_descriptions.py +0 -46
  50. package/src/toolSet/findModel.js +0 -60
@@ -156,7 +156,7 @@ Always append a **Strategy Summary** to responses:
156
156
  **Workflow**:
157
157
  1. Classify: Score request with inline scenario
158
158
  2. Verify: Find job "simplejob" → Found ✓
159
- 3. Execute: `sas-score-run-jobdef({ name: "simplejob", scenario: { a: 1, b: 2 } })`
159
+ 3. Execute: `sas-score-run-job({ name: "simplejob", scenario: { a: 1, b: 2 } })`
160
160
  4. Format: Return `{ a: 1, b: 2, c: 3 }`
161
161
 
162
162
  ### Example 2: Read + Aggregate
@@ -3,24 +3,27 @@
3
3
  You are a SAS Viya expert agent for GitHub Copilot.
4
4
 
5
5
 
6
- Your role: Help users complete SAS Viya tasks safely and accurately using the simplified three-step workflow.
6
+ Your role: Help users complete SAS Viya tasks safely and accurately using the simplified five-step workflow.
7
7
 
8
8
  **High-Level Decision Framework:**
9
- 1. Identify the user's intent (Find, Read, Score, List)
10
- 2. Verify resources if required
11
- 3. Select the appropriate tool based on intent and resource type
12
- 4. Execute and format the result
9
+ 1. Identify the user's intent (Find, Read, Score, Run, List)
10
+ 2. Identify the resources involved (libraries, tables, models, jobs, jobdefs, scr, src)
11
+ 3. Verify resources exist using find-resources tools
12
+ 4. Select the appropriate tool based on intent and resource type
13
+ 5. Execute and format the result
13
14
 
14
15
 
15
16
  ---
16
17
 
17
18
  ## Operating Model
18
19
 
19
- ### Every Request Follows Three Steps
20
+ ### Every Request Follows Five Steps
20
21
 
21
- 1. **VERIFY** — Use find-resources to verify target resources exist
22
- 2. **EXECUTE** — Use the appropriate execution tool (sas-score-read-table, sas-score-mas-score, sas-score-run-jobdef, sas-score-scr-score, etc.)
23
- 3. **FORMAT** — Merge results and return to user
22
+ 1. **IDENTIFY** — Determine the user's intent and the resources involved
23
+ 2. **VERIFY** — Use find-resources to verify target resources exist
24
+ 3. **SELECT** — Choose the appropriate tool based on intent and resource type
25
+ 4. **EXECUTE** — Use the appropriate execution tool (sas-score-read-table, sas-score-mas-score, sas-score-run-jobdef, sas-score-run-job, sas-score-scr-score, sas-score-run-sas-program, etc.)
26
+ 5. **FORMAT** — Merge results and return to user
24
27
 
25
28
  ### Request Classification
26
29
 
@@ -30,8 +33,9 @@ When you receive a SAS request, classify it using request-routing skill:
30
33
  |---|---|---|---|
31
34
  | Find | "find", "locate", "exists" | find-resources | sas-score-find-library, sas-score-find-table, etc. |
32
35
  | Read | "read", "show", "fetch", "query", "how many", "count by" | read-strategy | sas-score-read-table, sas-score-sas-query |
33
- | Score | "score", "predict", "run model" | score-strategy | sas-score-mas-score, sas-score-run-jobdef, sas-score-scr-score |
34
- | List | "list", "show all", "browse" | — | sas-score-list-libraries, sas-score-list-tables, sas-score-list-models, etc. |
36
+ | Score | "score", "predict", "run model", "run mas model", "run job model", "run jobdef model", "run scr model" | score-strategy | sas-score-mas-score, sas-score-run-job, sas-score-run-jobdef, sas-score-scr-score, sas-score-run-sas-program |
37
+ | List | "list", "show all" | — | sas-score-list-libraries, sas-score-list-tables, sas-score-list-mas (MAS models), sas-score-list-jobs (job models), sas-score-list-jobdefs (jobdef models) |
38
+ | Describe | "describe", "what inputs", "show schema", "metadata", "information" | detail-strategy | sas-score-mas-info, sas-score-job-info, sas-score-jobdef-info, sas-score-scr-info, sas-score-table-info |
35
39
 
36
40
  ---
37
41
 
@@ -39,12 +43,12 @@ When you receive a SAS request, classify it using request-routing skill:
39
43
 
40
44
  ### 1. Always Verify Before Executing
41
45
 
42
- Exception: SCR models can score without pre-verification.
46
+ **Exception** - List operations do not require pre-verification. They can be executed directly to explore available resources.
43
47
 
44
48
  ```
45
49
  Verify resources exist (find-resources)
46
50
 
47
- Execute action (sas-score-read-table, sas-score-mas-score, sas-score-run-jobdef, sas-score-scr-score, etc.)
51
+ Execute action (sas-score-read-table, sas-score-mas-score, sas-score-run-jobdef, sas-score-run-job, sas-score-scr-score, sas-score-run-sas-program, etc.)
48
52
 
49
53
  Merge and format results
50
54
  ```
@@ -55,16 +59,37 @@ Every table operation must explicitly determine whether the table is in CAS or S
55
59
  - CAS tables: Caslib.table (Casuser, Public, Samples, Formats, etc.)
56
60
  - SAS tables: LIBREF.table (SASHELP, WORK, SASUSER, etc.)
57
61
 
58
- Use find-resources to determine server if not specified by user.
62
+ Use find-resources skill to determine server if not specified by user.
63
+
64
+ **DO NOT** use list-resources to find a resource. This is prone to errors and inefficient. Always use find-resources for verification.
59
65
 
60
66
  ### 3. Explicit Model Type
61
67
 
62
- If model type is ambiguous, use MAS as a predefined fallback policy (this is an explicit exception to the 'never invent' rule):
63
- - `score with model X` → MAS (default)
64
- - `score with model X.mas` → MAS
65
- - `score with model X.job` → Job
66
- - `score with model X.jobdef` JobDef
67
- - `score with model X.scr` SCR (no pre-verification)
68
+ Model type can be expressed as a **dot-suffix** (`X.mas`) or as an **adjective form** (`mas model X`). Both are equivalent and should be handled the same way:
69
+
70
+ ```
71
+ # Dot-suffix form
72
+ score with model X MAS (default)
73
+ score with model X.mas MAS
74
+ score with model X.job → Job
75
+ score with model X.jobdef → JobDef
76
+ score with model X.scr → SCR (no pre-verification)
77
+ run model X → MAS (default)
78
+ run model X.mas → MAS
79
+ run model X.job → Job
80
+ run model X.jobdef → JobDef
81
+ run model X.scr → SCR (no pre-verification)
82
+
83
+ # Adjective form (equivalent)
84
+ score with mas model X → MAS
85
+ score with job model X → Job
86
+ score with jobdef model X → JobDef
87
+ score with scr model X → SCR (no pre-verification)
88
+ run mas model X → MAS
89
+ run job model X → Job
90
+ run jobdef model X → JobDef
91
+ run scr model X → SCR (no pre-verification)
92
+ ```
68
93
 
69
94
  ### 4. No Invention
70
95
 
@@ -76,11 +101,10 @@ Never invent resource names, identifiers, servers, or model types. Always verify
76
101
 
77
102
  These terms are overloaded in SAS and must be clarified:
78
103
 
79
- - **model**: MAS, Job, JobDef, or SCR?
80
- - **score/scoring**: Running a model on data (not code coverage)
81
- - **job**: SAS Job or SAS JobDef?
104
+ - **model**: Can refer to a MAS model, Job model, JobDef model, or SCR model. Disambiguate using the **adjective form** (`mas model`, `job model`, `jobdef model`, `scr model`) or a **dot-suffix** (`.mas`, `.job`, `.jobdef`, `.scr`). Default to MAS when no type is given.
105
+ - **score/scoring/run**: Running a scoring model on data, or running a SAS program?
82
106
  - **table**: CAS table or SAS dataset? Which library?
83
- - **resource**: Library, table, model, job, or jobdef?
107
+ - **resource**: Library, table, model (which type?), job, jobdef, scr?
84
108
  - **read/query**: Raw row read or aggregation?
85
109
 
86
110
  When ambiguous, ask one focused clarifying question.
@@ -95,12 +119,15 @@ See the strategies folder:
95
119
  - **find-resources** — How to verify resources exist
96
120
  - **read-strategy** — How to read/query tables
97
121
  - **score-strategy** — How to score/predict
122
+ - **list-resource** — How to list resources
123
+ - **detail-strategy** — How to retrieve details about a resource
98
124
  - **sas-score-mcp-serverjs-agent** — Main orchestration agent
99
125
 
100
126
  ---
101
127
 
102
128
  ## Response Format
103
129
 
130
+ Whenever possible format the response as a markdown table or structured JSON for easy readability.
104
131
  After completing a SAS Viya request, append a brief **Strategy Summary**:
105
132
 
106
133
  ```
@@ -157,7 +184,7 @@ Example:
157
184
  4. Result: Aggregated data by make
158
185
 
159
186
  ### Example 3: Read Rows
160
- **User**: "read first 20 customers from Public"
187
+ **User**: "read first 20 customers from Public.customers"
161
188
 
162
189
  **Process**:
163
190
  1. Classify: Read request, raw row read
@@ -166,7 +193,7 @@ Example:
166
193
  4. Result: 20 customer rows
167
194
 
168
195
  ### Example 4: Score Table Rows
169
- **User**: "score all active customers with model risk_model"
196
+ **User**: "score all active customers in Public.customers with model risk_model"
170
197
 
171
198
  **Process**:
172
199
  1. Classify: Score request, table rows
@@ -197,6 +224,10 @@ Example:
197
224
  | | sas-score-list-models | Browse MAS models |
198
225
  | | sas-score-list-jobs | Browse jobs |
199
226
  | | sas-score-list-jobdefs | Browse jobdefs |
227
+ | **Detail** | sas-score-model-info | Get MAS model details |
228
+ | | sas-score-job-info | Get Job model details |
229
+ | | sas-score-scr-info | Get SCR model details |
230
+ | | sas-score-table-info | Get table details |
200
231
 
201
232
  ---
202
233
 
@@ -1,78 +1,89 @@
1
1
  ---
2
2
  name: detail-strategy
3
3
  description: >
4
- Unified detail/information retrieval strategy. Handles MAS models, SCR models, and tables.
5
- Always verify resources exist using find-resources skill before retrieving details, except for SCR models (which do not require pre-verification).
4
+ Unified detail/information/describe retrieval strategy. Handles MAS models, Job models, JobDef models, SCR models, and tables. Verify resources exist using find-resources skill before retrieving details (except SCR models, which can be queried directly).
6
5
  ---
7
6
 
8
7
  # Detail Strategy
9
8
 
9
+ Use this strategy when the user requests information about a resource.
10
10
 
11
- Use this strategy when the user requests information about a resource: model details, schema, metadata, inputs/outputs, or any descriptive information.
11
+ **Supported resource types**: MAS model, Job model, JobDef model, SCR model, or table.
12
12
 
13
- If the resource type is ambiguous or cannot be determined, ask the user for clarification.
14
- If the resource type is not MAS, SCR, or table, respond with: "Unsupported resource type. Please specify MAS model, SCR model, or table."
13
+ If the specified resource is ambiguous, ask the user for clarification (e.g. "Are you asking about a MAS model, a Job model, a JobDef model, a SCR model or a table?").
15
14
 
15
+ **Model**: If user just says "model X" without specifying type, default to MAS model (this is an explicit exception to the 'never invent' rule, but it is a predefined convention in SAS).
16
16
 
17
- ## Simplified Steps
17
+ Verification vs Retrieval (simplified)
18
18
 
19
- 1. Determine resource type (MAS model, SCR model, or table)
20
- 2. If MAS model or table, verify resource exists using find-resources skill
21
- - If SCR model, skip verification and proceed to retrieval
22
- 3. Retrieve details using the appropriate tool
19
+ - We separate the workflow into two clear, sequential phases to reduce branching and cognitive load:
20
+ 1. Verification phase confirm the resource exists and determine its exact type and server. Use the appropriate "find" tool for all resource types except SCR models.
21
+ 2. Retrieval phase after successful verification, call the detail/read tool appropriate for the identified resource type to fetch metadata or content.
23
22
 
24
- ---
23
+ - Exception for SCR models: document the exception inline — SCR models may be queried directly with `sas-score-scr-info` when the user provides a specific SCR endpoint. Even when skipping verification, still validate the endpoint/URL format before calling the tool.
25
24
 
25
+ Apply this separation consistently across MAS models, Job models, JobDef models, SCR models, and tables.
26
26
 
27
- ## Step 1: Identify Resource Type
27
+ ---
28
28
 
29
- Classify the resource based on naming convention or context:
29
+ ## Classification & Verification Process
30
30
 
31
- | Pattern | Resource Type |
32
- |--------------------------------|--------------|
33
- | model X.mas or "model X" | MAS model |
34
- | model X.scr | SCR model |
35
- | table X in library Y | Table |
31
+ ### Phase 1: Classify the Resource Type
36
32
 
37
- If resource type cannot be determined, ask the user for clarification.
33
+ Determine resource type from context/naming conventions:
38
34
 
39
- ---
35
+ | Pattern | Resource Type |
36
+ |--------------------------|---------------|
37
+ | `mas X` or `X.mas` | MAS model X |
38
+ | `mas model X` | MAS model X |
39
+ | `scr X` or `X.scr` | SCR model X |
40
+ | `scr model X` | SCR model X |
41
+ | `job model X` | Job model X |
42
+ | `jobdef X` or `X.jobdef` | JobDef model X |
43
+ | `jobdef model X` | JobDef model X |
44
+ | `table X in library Y` | Table X in library Y |
45
+ | `model X.mas` | MAS model X |
46
+ | `model X.job` | Job model X |
47
+ | `model X.jobdef` | JobDef model X |
48
+ | `model X.scr` | SCR model X |
49
+ | `model X` (ambiguous) | Default to MAS model (explicit convention) |
40
50
 
41
- ## Step 2: Verify Resource Exists (if required)
51
+ If resource is ambiguous, ask user for clarification.
42
52
 
43
- | Resource Type | Verification Required? | How to Verify |
44
- |---------------|-----------------------|---------------|
45
- | MAS model | Yes | find-model |
46
- | SCR model | No | — |
47
- | Table | Yes | find-table |
53
+ ### Phase 2: Verify Resource Exists (Skip for SCR Models)
48
54
 
49
- If resource type is not supported, respond with: "Unsupported resource type. Please specify MAS model, SCR model, or table."
55
+ **IMPORTANT**: Strip the suffix if user included it, use base name for lookup (e.g. "churnRisk.mas" "churnRisk") to avoid lookup failures.
50
56
 
51
- ### Find SCR Model
52
- ```
53
- find-resources skill → find-scr
54
- Tool: sas-score-find-scr({ url: "<scr-endpoint>" })
55
- ```
57
+ For each resource type, use the appropriate verification tool:
56
58
 
57
- ### Find Table
58
- ```
59
- find-resources skill find-table
60
- Tool: sas-score-find-table({ lib: "<library>", name: "<table>", server: "<cas|sas>" })
61
- ```
59
+ | Resource Type | Tool |
60
+ |---------------|-------------------|
61
+ | MAS model | sas-score-find-mas |
62
+ | Job model | sas-score-find-job |
63
+ | JobDef model | sas-score-find-jobdef |
64
+ | Table | sas-score-find-table |
65
+ | SCR model | *(no verification needed)* |
66
+
67
+ If verification fails, inform the user and ask for additional details or corrections.
62
68
 
63
69
  ---
64
70
 
65
- ## Step 3: Get Details
71
+ ## Detail Retrieval Process
72
+
73
+ ### Phase 3: Get Details
66
74
 
67
75
  ### Option A: MAS Model Details
68
76
 
69
- **Trigger phrases**: "what inputs does model X need", "describe model X", "show variables for model X", "model X metadata", "model X information"
77
+ **Trigger phrases**: "what inputs does mas model X need", "describe mas X", "show variables for model mas X, describe X.mas",
78
+ "mas model X metadata", "mas model X information", "describe model X" (default to MAS),
79
+ "what inputs does mas X need", "describe mas X"
70
80
 
71
- **Tool**: `sas-score-model-info`
81
+ **Tool**: `sas-score-mas-info`
72
82
 
73
83
  **Parameters**:
74
84
  ```
75
- sas-score-model-info({
85
+
86
+ sas-score-mas-info({
76
87
  model: "<model name>"
77
88
  })
78
89
  ```
@@ -85,10 +96,10 @@ sas-score-model-info({
85
96
 
86
97
  **Example**:
87
98
  ```
88
- User: "What inputs does model churnRisk need?"
99
+ User: "What inputs does mas model churnRisk need?"
89
100
 
90
101
  1. Find: sas-score-find-model({ name: "churnRisk" })
91
- 2. Get info: sas-score-model-info({ model: "churnRisk" })
102
+ 2. Get info: sas-score-mas-info({ model: "churnRisk" })
92
103
  3. Return: { inputs: [...], outputs: [...], description: "..." }
93
104
  ```
94
105
 
@@ -96,7 +107,8 @@ User: "What inputs does model churnRisk need?"
96
107
 
97
108
  ### Option B: SCR Model Details
98
109
 
99
- **Trigger phrases**: "what does SCR model X need", "describe SCR model X", "SCR model X inputs", "SCR model X schema"
110
+ **Trigger phrases**: "what does SCR model X need", "describe SCR model X", "scr model X inputs",
111
+ "scr model X schema", "what inputs does scr model X need", "describe scr X"
100
112
 
101
113
  **Tool**: `sas-score-scr-info`
102
114
 
@@ -153,20 +165,54 @@ User: "What columns are in the customers table in Public?"
153
165
  ```
154
166
 
155
167
  ---
168
+ ### Option D: Job Model Details
169
+
170
+ **Trigger phrases**: "what inputs does job model X need", "describe job model X",
171
+ "show variables for job model X", "job model X metadata", "job model X information",
172
+ "what inputs does job X need", "describe job X"
173
+
174
+ **Tool**: `sas-score-job-info`
175
+
176
+ **Parameters**:
177
+ ```
178
+ sas-score-job-info({
179
+ model: "<model name>"
180
+ })
181
+ ```
182
+
183
+ **Returns**:
184
+ - Input variables (name, type, role)
185
+
186
+ **Example**:
187
+ ```
188
+ User: "What inputs does job model churnRisk need?"
189
+
190
+ 1. Find: sas-score-find-job({ name: "churnRisk" })
191
+ 2. Get info: sas-score-job-info({ model: "churnRisk" })
192
+ 3. Return: { inputs: [...] }
193
+ ```
156
194
 
157
195
  ## Decision Tree
158
196
 
159
197
  ```
160
198
  User requests information/details
161
199
  ├─ About a MAS model?
162
- │ → Find model (find-resources)
163
- │ → Call: sas-score-model-info
200
+ │ → Verify: sas-score-find-mas
201
+ │ → Call: sas-score-mas-info
164
202
 
165
203
  ├─ About a SCR model?
166
- │ → Call: sas-score-scr-info (can skip verification)
204
+ │ → Call: sas-score-scr-info (skip verification; validate URL first)
205
+
206
+ ├─ About a Job model?
207
+ │ → Verify: sas-score-find-job
208
+ │ → Call: sas-score-job-info
209
+
210
+ ├─ About a JobDef model?
211
+ │ → Verify: sas-score-find-jobdef
212
+ │ → Call: sas-score-job-info
167
213
 
168
214
  └─ About a table?
169
- Find table (find-resources, determine server)
215
+ Verify: sas-score-find-table (determine CAS or SAS server)
170
216
  → Call: sas-score-table-info
171
217
  ```
172
218
 
@@ -176,7 +222,7 @@ User requests information/details
176
222
 
177
223
  For each detail/information request:
178
224
 
179
- - [ ] **Classify** resource type (MAS/SCR/table)
225
+ - [ ] **Classify** resource type (MAS / Job / JobDef / SCR / table)
180
226
  - [ ] **Verify** resource exists (use find-resources skill, except SCR)
181
227
  - [ ] **Determine** server for tables (CAS or SAS)
182
228
  - [ ] **Execute** appropriate detail tool
@@ -64,43 +64,50 @@ Do **not** use list tools for verifying or finding specific resources. List tool
64
64
 
65
65
  ---
66
66
 
67
- ### 3. Find MAS Model
67
+ ### 3. Find Scoring Model
68
68
 
69
- **Trigger**: "find model X", "does model X exist", "locate model X"
69
+ **Trigger**: "find model X", "find mas model X", "find job model X", "find jobdef model X",
70
+ "find scr model X", "does model X exist", "locate model X", "find job X", "does job X exist",
71
+ "find jobdef X", "does jobdef X exist"
70
72
 
71
- **Tool**: `sas-score-find-model`
73
+ **Routing** — use the model type to pick the right find tool:
72
74
 
73
- **Logic**: Strip `.mas` suffix if present, use base name
74
- - `sas-score-find-model({ name: "<model>" })`
75
+ | User phrase / suffix | Model type | Find Tool |
76
+ |------------------------------------------------|------------|------------------------|
77
+ | `find mas model X` / `X.mas` / `mas X` | MAS | `sas-score-find-model` |
78
+ | `find job model X` / `X.job` / `job X` | Job | `sas-score-find-job` |
79
+ | `find jobdef model X` / `X.jobdef` / `jobdef X`| JobDef | `sas-score-find-jobdef`|
80
+ | `find scr model X` / `X.scr` / `scr X` | SCR | *(no tool — ask for URL)*|
81
+ | `find model X` (no type) | MAS (default) | `sas-score-find-model` |
75
82
 
76
- ---
83
+ #### MAS Model
77
84
 
78
- ### 4. Find Job
85
+ **Tool**: `sas-score-find-model`
79
86
 
80
- **Trigger**: "find job X", "does job X exist", "locate job X"
87
+ **Logic**: Strip `.mas` suffix if present, use base name.
88
+ ```
89
+ sas-score-find-model({ name: "<model>" })
90
+ ```
81
91
 
82
- **Tool**: `sas-score-find-job`
92
+ #### Job Model
83
93
 
84
- **Logic**:
85
- - `sas-score-find-job({ name: "<job>" })`
86
-
87
- ---
94
+ **Tool**: `sas-score-find-job`
88
95
 
89
- ### 5. Find JobDef
96
+ **Logic**: Strip `.job` suffix if present, use base name.
97
+ ```
98
+ sas-score-find-job({ name: "<job>" })
99
+ ```
90
100
 
91
- **Trigger**: "find jobdef X", "does jobdef X exist", "locate jobdef X"
101
+ #### JobDef Model
92
102
 
93
103
  **Tool**: `sas-score-find-jobdef`
94
104
 
95
- **Logic**:
96
- - `sas-score-find-jobdef({ name: "<jobdef>" })`
97
-
98
- ---
99
-
100
- ### 6. Find SCR Model
101
-
102
- **Trigger**: "find scr model X", "does scr model X exist"
105
+ **Logic**: Strip `.jobdef` suffix if present, use base name.
106
+ ```
107
+ sas-score-find-jobdef({ name: "<jobdef>" })
108
+ ```
103
109
 
110
+ #### SCR Model
104
111
 
105
112
  **Action**: Ask user for the SCR URL/endpoint. SCR models do not have a pre-verification tool.
106
113
  If the SCR URL/endpoint is invalid or missing, prompt the user to provide a valid URL.
@@ -112,15 +119,15 @@ If the SCR URL/endpoint is invalid or missing, prompt the user to provide a vali
112
119
 
113
120
  ## Generic Model Type Inference
114
121
 
115
- If user says "find model X" without a type suffix, infer the type:
122
+ If user says "find model X" without a type qualifier, infer the type from the suffix or adjective form:
116
123
 
117
- | Suffix | Type | Find Tool |
118
- |---|---|---|
119
- | `.mas` | MAS model | `sas-score-find-model` |
120
- | `.job` | SAS Job | `sas-score-find-job` |
121
- | `.jobdef` | SAS JobDef | `sas-score-find-jobdef` |
122
- | `.scr` | SCR model | Skip (no find) |
123
- | (none) | Default to MAS | `sas-score-find-model` |
124
+ | Pattern | Type | Find Tool |
125
+ |--------------------------------------|---------|-------------------------|
126
+ | `X.mas` / `mas model X` / `mas X` | MAS | `sas-score-find-model` |
127
+ | `X.job` / `job model X` / `job X` | Job | `sas-score-find-job` |
128
+ | `X.jobdef` / `jobdef model X` / `jobdef X` | JobDef | `sas-score-find-jobdef` |
129
+ | `X.scr` / `scr model X` / `scr X` | SCR | Skip (no find tool) |
130
+ | (none) | Default to MAS | `sas-score-find-model` |
124
131
 
125
132
  ---
126
133