@razroo/code-validation-mcp-client 1.1.0 → 1.3.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 +64 -18
  2. package/dist/index.js +17 -15
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -44,7 +44,9 @@ npm link
44
44
 
45
45
  You need these from Razroo:
46
46
  - **API Key**: `rzr_abc123...` (Razroo generates this for you)
47
- - **API URL**: `https://xyz.execute-api.us-east-1.amazonaws.com/prod`
47
+ - **API URL**:
48
+ - Production: `https://api.razroo.com/v1`
49
+ - Development: `https://api-dev.razroo.com/v1`
48
50
 
49
51
  ### 2. Configure Claude Code
50
52
 
@@ -57,7 +59,7 @@ Add to `~/.claude/claude_desktop_config.json`:
57
59
  "command": "razroo-mcp-client",
58
60
  "env": {
59
61
  "RAZROO_API_KEY": "rzr_your_api_key_here",
60
- "RAZROO_API_URL": "https://your-api-url.amazonaws.com/prod"
62
+ "RAZROO_API_URL": "https://api.razroo.com/v1"
61
63
  }
62
64
  }
63
65
  }
@@ -74,7 +76,7 @@ Add to `~/.claude/claude_desktop_config.json`:
74
76
  "args": ["/absolute/path/to/code-validation-client/dist/index.js"],
75
77
  "env": {
76
78
  "RAZROO_API_KEY": "rzr_your_api_key_here",
77
- "RAZROO_API_URL": "https://your-api-url.amazonaws.com/prod"
79
+ "RAZROO_API_URL": "https://api.razroo.com/v1"
78
80
  }
79
81
  }
80
82
  }
@@ -178,29 +180,73 @@ Get code files for a specific step.
178
180
 
179
181
  **Output:** Array of code files with content
180
182
 
181
- ### 4. `search_with_context`
183
+ ### 4. `search_with_context`
182
184
 
183
185
  **⚠️ MOST POWERFUL TOOL** - Search and get complete recipe context in one call.
184
186
 
185
- **Input:**
187
+ **Simplified API (Recommended):**
186
188
  - `code` (required): Code snippet to search
189
+ - `responseMode` (optional): One of `'minimal'`, `'preview'`, `'full'` (default: `'preview'`)
190
+ - **`'minimal'`**: Recipe metadata only, no code files (~5KB per recipe) - **Best for discovery**
191
+ - **`'preview'`**: Code snippets + key steps (~20KB per recipe) - **Best for most queries** (DEFAULT)
192
+ - **`'full'`**: Complete code + all steps (~50KB+ per recipe) - **Use only when you need complete details**
187
193
  - `framework` (optional): Filter by framework
188
194
  - `language` (optional): Filter by language
189
195
  - `operationType` (optional): Filter by operation type
190
196
  - `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
197
+ - `offset` (optional): Pagination offset - skip first N items (default: 0)
198
+
199
+ **Advanced Options (Override `responseMode`):**
200
+ - `includeCodeFiles` (optional): Include code content
201
+ - `maxStepsPerRecipe` (optional): Max steps per recipe
202
+ - `maxFilesPerStep` (optional): Max files per step
203
+ - `maxFileSize` (optional): Max characters per file
204
+ - `stepSelectionStrategy` (optional): `'complete'` or `'adjacent'`
205
+
206
+ **Output:** Complete recipe matches with all steps, recommendations, execution plan, and pagination metadata
207
+
208
+ **When to Use Each Mode:**
209
+ - **`'minimal'`**: "Show me AWS starters", "What authentication recipes exist?"
210
+ - **`'preview'`**: "Add authentication to my app", "Create a user registration form" (MOST COMMON)
211
+ - **`'full'`**: "Show me the complete AWS CDK starter implementation"
212
+
213
+ **Progressive Fetching Example:**
214
+ ```typescript
215
+ // Step 1: Discovery with minimal mode
216
+ const recipes = await search_with_context({
217
+ code: "AWS starter",
218
+ responseMode: "minimal"
219
+ });
220
+ // Returns: List of AWS starters with metadata (~5KB)
221
+
222
+ // Step 2: User selects "AWS CDK Starter"
223
+ // Step 3: Fetch full code for selected recipe
224
+ const fullRecipe = await search_with_context({
225
+ code: "AWS CDK Starter",
226
+ responseMode: "full",
227
+ limit: 1
228
+ });
229
+ // Returns: Complete implementation (~50KB)
230
+ ```
231
+
232
+ **Pagination Example:**
233
+ ```typescript
234
+ // Fetch first 5 results
235
+ const page1 = await search_with_context({
236
+ code: "authentication",
237
+ responseMode: "preview",
238
+ limit: 5,
239
+ offset: 0
240
+ });
241
+
242
+ // Fetch next 5 results
243
+ const page2 = await search_with_context({
244
+ code: "authentication",
245
+ responseMode: "preview",
246
+ limit: 5,
247
+ offset: 5
248
+ });
249
+ ```
204
250
 
205
251
  ## Troubleshooting
206
252
 
package/dist/index.js CHANGED
@@ -9,15 +9,11 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
9
9
  import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
10
10
  // Get config from environment
11
11
  const API_KEY = process.env.RAZROO_API_KEY;
12
- const API_URL = process.env.RAZROO_API_URL;
12
+ const API_URL = process.env.RAZROO_API_URL || 'https://mcp-api.razroo.com/v1';
13
13
  if (!API_KEY) {
14
14
  console.error('Error: RAZROO_API_KEY environment variable is required');
15
15
  process.exit(1);
16
16
  }
17
- if (!API_URL) {
18
- console.error('Error: RAZROO_API_URL environment variable is required');
19
- process.exit(1);
20
- }
21
17
  // Tool definitions
22
18
  const TOOLS = [
23
19
  {
@@ -128,31 +124,37 @@ const TOOLS = [
128
124
  description: 'Number of recipe matches to return (default: 10, max: 50)',
129
125
  default: 10,
130
126
  },
127
+ offset: {
128
+ type: 'number',
129
+ description: 'Pagination offset - skip first N items (default: 0)',
130
+ default: 0,
131
+ },
132
+ responseMode: {
133
+ type: 'string',
134
+ enum: ['minimal', 'preview', 'full'],
135
+ 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.',
136
+ default: 'preview',
137
+ },
131
138
  includeCodeFiles: {
132
139
  type: 'boolean',
133
- description: 'Include code file contents in response (default: true). Set to false for summaries only.',
134
- default: true,
140
+ description: 'Advanced: Include code file contents (overrides responseMode if specified)',
135
141
  },
136
142
  maxStepsPerRecipe: {
137
143
  type: 'number',
138
- description: 'Maximum steps per recipe to return (default: 10, max: 20)',
139
- default: 10,
144
+ description: 'Advanced: Maximum steps per recipe to return (overrides responseMode if specified)',
140
145
  },
141
146
  maxFilesPerStep: {
142
147
  type: 'number',
143
- description: 'Maximum files per step to return (default: 20, max: 50)',
144
- default: 20,
148
+ description: 'Advanced: Maximum files per step to return (overrides responseMode if specified)',
145
149
  },
146
150
  maxFileSize: {
147
151
  type: 'number',
148
- description: 'Maximum characters per file (default: 10000, max: 50000)',
149
- default: 10000,
152
+ description: 'Advanced: Maximum characters per file (overrides responseMode if specified)',
150
153
  },
151
154
  stepSelectionStrategy: {
152
155
  type: 'string',
153
156
  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',
157
+ description: 'Advanced: Step selection strategy (overrides responseMode if specified)',
156
158
  },
157
159
  },
158
160
  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.3.0",
4
4
  "description": "MCP client bridge for Razroo Code Validation API",
5
5
  "type": "module",
6
6
  "bin": {