review.check-ruby-extensions
Verify Ruby extensions are loaded correctly in Re:VIEW manuscripts to ensure proper document processing and prevent compatibility issues during writing.
Instructions
Verify Ruby extensions (ReviewExtention) are loaded correctly
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes |
Implementation Reference
- src/index.ts:343-351 (registration)Tool registration in the MCP tools array, defining name, description, and input schema.{ name: "review.check-ruby-extensions", description: "Verify Ruby extensions (ReviewExtention) are loaded correctly", inputSchema: { type: "object", properties: { cwd: { type: "string" } }, required: ["cwd"] } },
- src/index.ts:570-579 (handler)Dispatch handler in the main CallToolRequestSchema switch statement that invokes the actual implementation via hybridCommands.case "review.check-ruby-extensions": { const result = await hybridCommands.checkRubyExtensions({ cwd: args.cwd as string }); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; }
- src/commands/hybrid-pipeline.ts:103-130 (handler)Core handler function that runs a Ruby command to load review-ext.rb and checks $LOADED_FEATURES for Review extensions, returning load status.export async function checkRubyExtensionsCommand(options: { cwd: string }) { const { cwd } = options; try { const result = await runCommand("ruby", [ "-r", "./review-ext.rb", "-e", "puts 'Extensions loaded: ' + $LOADED_FEATURES.grep(/review/).join(', ')" ], { cwd, env: { ...process.env, DEBUG: "1" } }); const extensionsLoaded = result.stdout.includes("Extensions loaded"); const loadedFiles = result.stdout.match(/Extensions loaded: (.+)/)?.[1] || ""; return { success: extensionsLoaded, loadedExtensions: loadedFiles.split(", ").filter(Boolean), output: result.stdout }; } catch (error: any) { return { success: false, error: error.message, stderr: error.stderr }; } }
- src/commands/hybrid-pipeline.ts:211-212 (registration)Re-export of the handler function as part of hybridCommands object, used by index.ts.checkRubyExtensions: checkRubyExtensionsCommand, testMapfile: testMapfileCommand