@razroo/code-validation-mcp-client 1.0.2 → 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 +68 -0
  2. package/dist/index.js +32 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -178,6 +178,74 @@ 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` ⭐
182
+
183
+ **⚠️ MOST POWERFUL TOOL** - Search and get complete recipe context in one call.
184
+
185
+ **Simplified API (Recommended):**
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**
191
+ - `framework` (optional): Filter by framework
192
+ - `language` (optional): Filter by language
193
+ - `operationType` (optional): Filter by operation type
194
+ - `limit` (optional): Number of recipe matches (default: 10)
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
+ ```
248
+
181
249
  ## Troubleshooting
182
250
 
183
251
  ### "RAZROO_API_KEY is required"
package/dist/index.js CHANGED
@@ -128,6 +128,38 @@ 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
+ },
142
+ includeCodeFiles: {
143
+ type: 'boolean',
144
+ description: 'Advanced: Include code file contents (overrides responseMode if specified)',
145
+ },
146
+ maxStepsPerRecipe: {
147
+ type: 'number',
148
+ description: 'Advanced: Maximum steps per recipe to return (overrides responseMode if specified)',
149
+ },
150
+ maxFilesPerStep: {
151
+ type: 'number',
152
+ description: 'Advanced: Maximum files per step to return (overrides responseMode if specified)',
153
+ },
154
+ maxFileSize: {
155
+ type: 'number',
156
+ description: 'Advanced: Maximum characters per file (overrides responseMode if specified)',
157
+ },
158
+ stepSelectionStrategy: {
159
+ type: 'string',
160
+ enum: ['complete', 'adjacent'],
161
+ description: 'Advanced: Step selection strategy (overrides responseMode if specified)',
162
+ },
131
163
  },
132
164
  required: ['code'],
133
165
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razroo/code-validation-mcp-client",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "MCP client bridge for Razroo Code Validation API",
5
5
  "type": "module",
6
6
  "bin": {