Skip to main content
Glama

fluffos_disassemble

Disassemble LPC files to display compiled bytecode for debugging and understanding code compilation processes.

Instructions

Disassemble an LPC file to show compiled bytecode using lpcc. Useful for debugging and understanding how code compiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesAbsolute path to the LPC file to disassemble

Implementation Reference

  • Core handler function that executes the disassembly by spawning the FluffOS lpcc binary on the normalized LPC file path, capturing and returning the output.
    async runLpcc(lpcFile) {
      return new Promise((resolve, reject) => {
        const normalizedPath = this.normalizePath(lpcFile)
        const lpccPath = path.join(this.binDir, "lpcc")
        const proc = spawn(lpccPath, [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(output)
          } else {
            resolve(`Error (exit code: ${code}):\n\n${output}`)
          }
        })
    
        proc.on("error", err => {
          reject(new Error(`Failed to run lpcc: ${err.message}`))
        })
      })
    }
  • Input schema and metadata definition for the fluffos_disassemble tool.
    {
      name: "fluffos_disassemble",
      description:
        "Disassemble an LPC file to show compiled bytecode using lpcc. Returns detailed bytecode, function tables, strings, and disassembly. Useful for debugging and understanding how code compiles.",
      inputSchema: {
        type: "object",
        properties: {
          file: {
            type: "string",
            description: "Absolute path to the LPC file to disassemble",
          },
        },
        required: ["file"],
      },
    },
  • src/index.js:158-169 (registration)
    Tool call dispatch/registration in the CallToolRequestSchema handler switch statement.
    case "fluffos_disassemble": {
      const result = await this.runLpcc(args.file)
    
      return {
        content: [
          {
            type: "text",
            text: result,
          },
        ],
      }
    }
  • Helper function to normalize LPC file paths relative to the mudlib directory.
    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
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool is 'useful for debugging and understanding how code compiles,' which gives some behavioral context about its purpose. However, it doesn't disclose important behavioral traits like whether this is a read-only operation, what permissions are needed, whether it modifies the file, error handling, or output format details.

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 appropriately sized and front-loaded. The first sentence clearly states the core functionality, and the second sentence adds valuable context about when to use it. Both sentences earn their place with zero waste.

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?

Given the tool has 1 parameter with 100% schema coverage and no output schema, the description provides adequate but minimal context. It explains what the tool does and its use cases, but for a tool with no annotations and no output schema, it should ideally provide more behavioral details about what the disassembly output looks like or any limitations.

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?

The schema description coverage is 100%, with the single parameter 'file' well-documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't need to.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Disassemble an LPC file to show compiled bytecode using lpcc.' It specifies the verb (disassemble), resource (LPC file), and method (using lpcc). However, it doesn't explicitly differentiate from the sibling tool 'fluffos_validate', which appears to be a different operation.

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

Usage Guidelines3/5

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

The description provides implied usage context: 'Useful for debugging and understanding how code compiles.' This suggests when to use the tool, but doesn't explicitly state when not to use it or mention alternatives. No comparison to the sibling tool is provided.

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