@razroo/code-validation-mcp-client 1.1.0 → 1.2.0

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 (3) hide show
  1. package/README.md +59 -15
  2. package/dist/index.js +16 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -178,29 +178,73 @@ Get code files for a specific step.
178
178
 
179
179
  **Output:** Array of code files with content
180
180
 
181
- ### 4. `search_with_context`
181
+ ### 4. `search_with_context`
182
182
 
183
183
  **⚠️ MOST POWERFUL TOOL** - Search and get complete recipe context in one call.
184
184
 
185
- **Input:**
185
+ **Simplified API (Recommended):**
186
186
  - `code` (required): Code snippet to search
187
+ - `responseMode` (optional): One of `'minimal'`, `'preview'`, `'full'` (default: `'preview'`)
188
+ - **`'minimal'`**: Recipe metadata only, no code files (~5KB per recipe) - **Best for discovery**
189
+ - **`'preview'`**: Code snippets + key steps (~20KB per recipe) - **Best for most queries** (DEFAULT)
190
+ - **`'full'`**: Complete code + all steps (~50KB+ per recipe) - **Use only when you need complete details**
187
191
  - `framework` (optional): Filter by framework
188
192
  - `language` (optional): Filter by language
189
193
  - `operationType` (optional): Filter by operation type
190
194
  - `limit` (optional): Number of recipe matches (default: 10)
191
- - `includeCodeFiles` (optional): Include code content (default: true)
192
- - `maxStepsPerRecipe` (optional): Max steps per recipe (default: 10)
193
- - `maxFilesPerStep` (optional): Max files per step (default: 20)
194
- - `maxFileSize` (optional): Max characters per file (default: 10000)
195
- - `stepSelectionStrategy` (optional): Step selection strategy (default: 'complete')
196
- - `'complete'`: Returns ALL steps in the recipe (best for starters/scaffolds)
197
- - `'adjacent'`: Returns only matched + setup + nearby steps (minimal context)
198
-
199
- **Output:** Complete recipe matches with all steps, recommendations, and execution plan
200
-
201
- **When to Use:**
202
- - Use `'complete'` strategy (default) for: AWS starters, authentication setup, form scaffolds, API integration
203
- - Use `'adjacent'` strategy for: Specific bug fixes, targeted changes where you only need minimal context
195
+ - `offset` (optional): Pagination offset - skip first N items (default: 0)
196
+
197
+ **Advanced Options (Override `responseMode`):**
198
+ - `includeCodeFiles` (optional): Include code content
199
+ - `maxStepsPerRecipe` (optional): Max steps per recipe
200
+ - `maxFilesPerStep` (optional): Max files per step
201
+ - `maxFileSize` (optional): Max characters per file
202
+ - `stepSelectionStrategy` (optional): `'complete'` or `'adjacent'`
203
+
204
+ **Output:** Complete recipe matches with all steps, recommendations, execution plan, and pagination metadata
205
+
206
+ **When to Use Each Mode:**
207
+ - **`'minimal'`**: "Show me AWS starters", "What authentication recipes exist?"
208
+ - **`'preview'`**: "Add authentication to my app", "Create a user registration form" (MOST COMMON)
209
+ - **`'full'`**: "Show me the complete AWS CDK starter implementation"
210
+
211
+ **Progressive Fetching Example:**
212
+ ```typescript
213
+ // Step 1: Discovery with minimal mode
214
+ const recipes = await search_with_context({
215
+ code: "AWS starter",
216
+ responseMode: "minimal"
217
+ });
218
+ // Returns: List of AWS starters with metadata (~5KB)
219
+
220
+ // Step 2: User selects "AWS CDK Starter"
221
+ // Step 3: Fetch full code for selected recipe
222
+ const fullRecipe = await search_with_context({
223
+ code: "AWS CDK Starter",
224
+ responseMode: "full",
225
+ limit: 1
226
+ });
227
+ // Returns: Complete implementation (~50KB)
228
+ ```
229
+
230
+ **Pagination Example:**
231
+ ```typescript
232
+ // Fetch first 5 results
233
+ const page1 = await search_with_context({
234
+ code: "authentication",
235
+ responseMode: "preview",
236
+ limit: 5,
237
+ offset: 0
238
+ });
239
+
240
+ // Fetch next 5 results
241
+ const page2 = await search_with_context({
242
+ code: "authentication",
243
+ responseMode: "preview",
244
+ limit: 5,
245
+ offset: 5
246
+ });
247
+ ```
204
248
 
205
249
  ## Troubleshooting
206
250
 
package/dist/index.js CHANGED
@@ -128,31 +128,37 @@ const TOOLS = [
128
128
  description: 'Number of recipe matches to return (default: 10, max: 50)',
129
129
  default: 10,
130
130
  },
131
+ offset: {
132
+ type: 'number',
133
+ description: 'Pagination offset - skip first N items (default: 0)',
134
+ default: 0,
135
+ },
136
+ responseMode: {
137
+ type: 'string',
138
+ enum: ['minimal', 'preview', 'full'],
139
+ description: 'Response mode preset (RECOMMENDED - Simple API): "minimal" = recipe metadata only (~5KB), "preview" = code snippets + key steps (~20KB, DEFAULT), "full" = complete code + all steps (~50KB+). Use minimal for discovery, preview for most queries, full only when you need complete implementation details.',
140
+ default: 'preview',
141
+ },
131
142
  includeCodeFiles: {
132
143
  type: 'boolean',
133
- description: 'Include code file contents in response (default: true). Set to false for summaries only.',
134
- default: true,
144
+ description: 'Advanced: Include code file contents (overrides responseMode if specified)',
135
145
  },
136
146
  maxStepsPerRecipe: {
137
147
  type: 'number',
138
- description: 'Maximum steps per recipe to return (default: 10, max: 20)',
139
- default: 10,
148
+ description: 'Advanced: Maximum steps per recipe to return (overrides responseMode if specified)',
140
149
  },
141
150
  maxFilesPerStep: {
142
151
  type: 'number',
143
- description: 'Maximum files per step to return (default: 20, max: 50)',
144
- default: 20,
152
+ description: 'Advanced: Maximum files per step to return (overrides responseMode if specified)',
145
153
  },
146
154
  maxFileSize: {
147
155
  type: 'number',
148
- description: 'Maximum characters per file (default: 10000, max: 50000)',
149
- default: 10000,
156
+ description: 'Advanced: Maximum characters per file (overrides responseMode if specified)',
150
157
  },
151
158
  stepSelectionStrategy: {
152
159
  type: 'string',
153
160
  enum: ['complete', 'adjacent'],
154
- description: 'Step selection strategy (default: "complete"). Use "complete" to get ALL steps in the recipe (best for starters/scaffolds). Use "adjacent" for minimal context (matched + setup + nearby steps only).',
155
- default: 'complete',
161
+ description: 'Advanced: Step selection strategy (overrides responseMode if specified)',
156
162
  },
157
163
  },
158
164
  required: ['code'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razroo/code-validation-mcp-client",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "MCP client bridge for Razroo Code Validation API",
5
5
  "type": "module",
6
6
  "bin": {