Skip to main content
Glama

decompile_swf

Decompile all ActionScript code from a SWF file, extracting AS2/AS3 scripts into organized directories for analysis.

Instructions

Decompile all ActionScript code from a SWF file.

This tool extracts and decompiles all ActionScript (AS2/AS3) code from a Flash SWF file, organizing the output into a directory structure that mirrors the package hierarchy.

Args: swf_path: Absolute path to the SWF file to decompile output_dir: Directory where decompiled scripts will be saved timeout: Optional timeout in seconds (default: 60)

Returns: Dictionary with: - success: Whether decompilation succeeded - swf_path: Input SWF file path - output_dir: Output directory path - script_count: Number of ActionScript files extracted - message: Success message

Example: >>> decompile_swf("/path/to/game.swf", "/path/to/output") { "success": true, "swf_path": "/path/to/game.swf", "output_dir": "/path/to/output", "script_count": 42, "message": "Successfully decompiled 42 ActionScript files" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
swf_pathYes
output_dirYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description discloses the decompilation process, output structure, and timeout option. It does not mention error handling for corrupted files, but the behavior is sufficiently clear for a read-only analysis tool.

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 well-structured with a summary, detailed paragraph, args, returns, and an example. Every sentence is valuable and efficiently conveys necessary information.

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

Completeness5/5

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

Given the presence of an output schema, the description covers inputs and outputs thoroughly, and the sibling tools are distinct. No additional context is needed for effective use.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully explains all three parameters in the Args section, including types, purposes, and optional defaults, adding substantial meaning beyond the raw schema.

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 tool decompiles all ActionScript code from a SWF file, specifying the resource, action, and output structure. It distinguishes from siblings like 'extract_assets' and 'list_symbols' by focusing on full code decompilation.

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 an example but no explicit guidance on when to use this tool versus siblings like 'extract_actionscript' or 'get_swf_metadata'. Usage context is implied but not directed.

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/sublimnl/ffdecmcp'

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