Skip to main content
Glama

fluffos_validate

Validate LPC code files by checking for compilation errors using the FluffOS driver's symbol tool to ensure code correctness before deployment.

Instructions

Validate an LPC file using the FluffOS driver's symbol tool. Returns success/failure and any compilation errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesAbsolute path to the LPC file to validate

Implementation Reference

  • src/index.js:90-106 (registration)
    Registration of the fluffos_validate tool, including name, description, and input schema.
    { name: "fluffos_validate", description: "Validate an LPC file using the FluffOS driver's symbol tool. " + "Compiles the file and reports success or failure with any " + "compilation errors. Fast and lightweight check for code validity.", inputSchema: { type: "object", properties: { file: { type: "string", description: "Absolute path to the LPC file to validate", }, }, required: ["file"], }, },
  • Dispatch handler in the CallToolRequestSchema that invokes runSymbol for fluffos_validate.
    case "fluffos_validate": { const result = await this.runSymbol(args.file) return { content: [ { type: "text", text: result, }, ], } }
  • Core handler logic for fluffos_validate: spawns FluffOS 'symbol' tool to compile/validate the LPC file, captures stdout/stderr, and returns success/failure message with output.
    async runSymbol(lpcFile) { return new Promise((resolve, reject) => { const normalizedPath = this.normalizePath(lpcFile) const symbolPath = path.join(this.binDir, "symbol") const proc = spawn(symbolPath, [this.configFile, normalizedPath], { cwd: path.dirname(this.configFile), }) let stdout = "" let stderr = "" proc.stdout.on("data", data => { stdout += data.toString() }) proc.stderr.on("data", data => { stderr += data.toString() }) proc.on("close", code => { const output = (stdout + stderr).trim() if(code === 0) { resolve(`✓ File validated successfully\n\n${output}`) } else { resolve(`✗ Validation failed (exit code: ${code})\n\n${output}`) } }) proc.on("error", err => { reject(new Error(`Failed to run symbol: ${err.message}`)) }) }) }
  • Helper function to normalize LPC file paths by stripping the mudlib directory prefix if applicable, used in runSymbol.
    normalizePath(lpcFile) { // If we have a mudlib directory and the file path is absolute and starts with mudlib dir, // convert it to a relative path if(this.mudlibDir && path.isAbsolute(lpcFile) && lpcFile.startsWith(this.mudlibDir) ) { // Remove mudlib directory prefix and leading slash return lpcFile.substring(this.mudlibDir.length).replace(/^\/+/, "") } // Otherwise return as-is (already relative or not under mudlib) return lpcFile }
  • Input schema definition for the fluffos_validate tool.
    inputSchema: { type: "object", properties: { file: { type: "string", description: "Absolute path to the LPC file to validate", }, }, required: ["file"], },
Install Server

Other Tools

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/gesslar/fluffos-mcp'

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