Skip to main content
Glama

review.preprocess

Normalizes Re:VIEW manuscript input and adds metadata to prepare files for validation and correction processes.

Instructions

JS preprocessor only - normalizes input and adds metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes
outputNo
patternNo
statsNo

Implementation Reference

  • The primary handler function executing the tool logic for 'review.preprocess'. Currently a stub that skips processing.
    export async function preprocessCommand(options: PreprocessOptions) { const { pattern = "articles/**/*.re", output = ".out", stats = true, cwd } = options; // Skip preprocessing for now since review-macro-shims is not available // In production, this would call the actual preprocessor console.log("[preprocess] Skipping JS preprocessing (using standard Re:VIEW)"); return { success: true, output: "Preprocessing skipped - using standard Re:VIEW", stats: stats ? { filesProcessed: 0, macrosExpanded: 0, warnings: [] } : null }; }
  • Tool registration entry defining the name, description, and input schema.
    name: "review.preprocess", description: "JS preprocessor only - normalizes input and adds metadata", inputSchema: { type: "object", properties: { cwd: { type: "string" }, pattern: { type: "string" }, output: { type: "string" }, stats: { type: "boolean" } }, required: ["cwd"] } },
  • src/index.ts:543-555 (registration)
    MCP CallToolRequestSchema handler case that invokes the preprocess function.
    case "review.preprocess": { const result = await hybridCommands.preprocess({ cwd: args.cwd as string, pattern: args.pattern as string | undefined, output: args.output as string | undefined, stats: args.stats as boolean | undefined }); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; }
  • Type definition matching the tool's inputSchema.
    export interface PreprocessOptions { pattern?: string; output?: string; stats?: boolean; cwd: string; }
  • Object exporting the preprocess function for use in index.ts.
    export const hybridCommands = { preprocess: preprocessCommand, buildPdfHybrid: buildPdfHybridCommand, checkRubyExtensions: checkRubyExtensionsCommand, testMapfile: testMapfileCommand };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsgarage/ReviewMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server