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"],
    },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the validation outcome ('success/failure and any compilation errors'), which is useful context beyond basic functionality. However, it doesn't address important behavioral aspects like error handling, performance characteristics, or whether this operation has side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences that each earn their place: the first states the core functionality, and the second describes the return value. There's zero waste or redundancy, and it's appropriately front-loaded with the main purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter validation tool with no annotations and no output schema, the description provides adequate but minimal information. It covers what the tool does and what it returns, but doesn't address potential complexities like what constitutes validation success versus failure, error message formats, or limitations of the validation process.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents the single 'file' parameter. The description doesn't add any additional meaning about the parameter beyond what the schema provides, such as file format requirements or validation scope limitations. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('validate an LPC file') and resource ('using the FluffOS driver's symbol tool'), distinguishing it from the sibling tool 'fluffos_disassemble' which implies a different operation. It provides a complete verb+resource+scope statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. While the sibling tool name suggests a different function, the description doesn't explicitly state when to choose validation over disassembly or other potential options. There's no mention of prerequisites or context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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