Skip to main content
Glama

re-kaitai

MCP server exposing Kaitai Struct for custom binary format reverse engineering.

Tools

Tool

What it does

check_compiler

Confirm kaitai-struct-compiler is installed

list_known_formats

List bundled .ksy formats

download_format

Download a .ksy from the kaitai-formats gallery

compile_format

Compile .ksy → Python at runtime

parse_with_format

Parse a binary with a compiled or precompiled format

visualize

Same as parse_with_format, named for the intent

diff_parses

Parse two files and return a structural diff

Related MCP server: mcp-pwntools

Install

# System dependency
brew install kaitai-struct-compiler   # macOS
scoop install kaitai-struct-compiler  # Windows
# Linux: download prebuilt from https://github.com/kaitai-io/kaitai_struct_compiler/releases

# Python
pip install kaitaistruct
pip install -e ./servers/re-kaitai

Usage pattern (in Claude Code)

1. "Decode this firmware blob"
2. Claude identifies the file magic (e.g. LZMA header)
3. Claude downloads the matching .ksy: download_format("lzma")
4. Claude compiles: compile_format("/path/lzma.ksy")
5. Claude parses: parse_with_format(path="/path/blob", ksy_path="/path/lzma.ksy")
6. Claude inspects the parse tree, iterates on the .ksy, re-parses

The Kaitai workflow is iterative: compile → parse → fix the schema → re-compile → parse again.

Available Tools

8 tools
check_compilerA

Return kaitai-struct-compiler version.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It only states the output but does not disclose side effects, idempotency, or any requirements (e.g., authentication, network access).

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 a single sentence with no wasted words. It is appropriately sized for a simple tool.

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

Completeness4/5

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

For a tool with no parameters and no output schema, the description tells the core function. It lacks details like return format, but given low complexity, it is nearly complete.

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

Parameters4/5

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

There are zero parameters, and schema coverage is 100% (trivially). The description adds context that the tool returns a version, which is meaningful. Baseline for 0 params is 4, and description adds value.

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 returns the kaitai-struct-compiler version, with a specific verb and resource. It distinguishes itself from sibling tools like compile_format and parse_with_format, which have different purposes.

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. It does not mention scenarios (e.g., checking version before compilation) or exclude any context.

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

compile_formatC

Compile a .ksy file to a Python module.

ParametersJSON Schema
NameRequiredDescriptionDefault
ksy_pathYes
targetNopython

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description must disclose behaviors but only says 'compile ... to a Python module'. It omits critical details such as whether the output is a file, console output, or returned; error handling; or side effects. The single sentence is insufficient for safe invocation.

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

Conciseness2/5

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

While the description is very short, it is under-specified and fails to pack necessary information. Brevity here comes at the cost of completeness, making it less useful than a more detailed but still concise explanation.

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

Completeness2/5

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

Given the tool has two parameters, no output schema, and no annotations, the description should provide more context. It does not explain the return value, output location, or potential errors. The agent lacks information to use the tool correctly.

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

Parameters1/5

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

The input schema has zero description coverage (0%), and the tool description does not mention any parameter names or explain their meaning. 'ksy_path' and 'target' are left completely undefined, forcing the agent to guess their semantics.

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 verb 'compile' and specifies the input resource '.ksy file' and output 'Python module'. It distinguishes the tool from siblings like 'check_compiler' or 'parse_with_format' by focusing on code generation rather than validation or parsing.

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?

The description provides no guidance on when to use this tool versus its siblings. It does not mention any prerequisites, alternatives, or exclusions, leaving the agent without context for selection.

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

diff_parsesC

Parse two files with the same format and return a structural diff.

ParametersJSON Schema
NameRequiredDescriptionDefault
path_aYes
path_bYes
format_moduleNo
ksy_pathNo

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries full burden but only states it returns a 'structural diff'. It doesn't disclose failure modes, prerequisites (e.g., format must be known), or whether the tool parses from scratch or accepts pre-parsed data.

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

Conciseness3/5

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

The description is a single short sentence, which is concise but lacks necessary detail. It is not overly verbose, but the brevity comes at the cost of clarity and completeness.

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

Completeness1/5

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

Given no annotations, no output schema, and 4 parameters with no description, the tool description is severely incomplete. It fails to explain the purpose of optional parameters, output behavior, or any constraints, making it insufficient for correct agent use.

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

Parameters1/5

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

Schema coverage is 0%, but the description adds no meaning to any of the 4 parameters. The terms format_module and ksy_path are entirely unexplained, leaving the agent unable to determine how to specify the format.

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 parses two files and returns a structural diff, distinguishing it from single-file parsing tools like parse_unityfs. However, it doesn't explicitly mention that the files must have the same format, which is implied but could be clearer.

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 on when to use this tool vs alternatives such as parse_with_format for single files or visualize for visualization. No exclusions or context provided.

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

download_formatC

Download a .ksy spec from the kaitai-formats gallery.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
target_dirNo

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It implies a read-only fetch operation but omits details like network requirements, authentication, whether the file is saved to disk (target_dir), or any side effects. This is insufficient for an agent to understand the tool's full behavior.

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

Conciseness3/5

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

The description is extremely concise (one sentence), but it is front-loaded with the core action. However, given the lack of parameter details, the conciseness comes at the cost of completeness. It earns a middle score because it is not verbose but also not sufficiently informative.

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

Completeness2/5

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

With no output schema and no annotations, the description should compensate but fails to explain what a '.ksy spec' is, where the gallery is, or what the agent receives after download. The missing context makes it hard for an agent to judge whether this tool meets its needs.

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

Parameters1/5

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

Schema description coverage is 0%, yet the description does not explain any parameter. 'name' and 'target_dir' are left entirely undefined; the agent must guess that 'name' refers to a format identifier and 'target_dir' to a save location. This severely hampers correct invocation.

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 action (download) and the resource (.ksy spec from gallery), making the basic purpose understandable. However, it does not differentiate from sibling tools like list_known_formats or compile_format, which could cause confusion for an AI agent selecting among them.

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, such as when to download vs. compile or parse a format. An agent must infer usage from the tool name alone.

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

list_known_formatsA

Return the list of bundled .ksy formats.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/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 states the tool returns a list, which implies a read operation, but does not explicitly confirm it is non-destructive or mention any other behavioral traits like side effects or auth requirements.

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 consists of a single, front-loaded sentence with no superfluous words. It is as concise as possible while still conveying the tool's purpose.

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?

The tool is simple with no parameters and an output schema. The description adequately covers what the tool does without needing to explain return values, as the output schema presumably provides that. No gaps are apparent.

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

Parameters4/5

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

There are no parameters, so schema coverage is trivially 100%. The description does not need to add parameter context. It is clear and sufficient for a parameterless tool.

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 uses a specific verb 'Return' and identifies the exact resource 'list of bundled .ksy formats'. It clearly distinguishes this tool from its siblings, which perform other actions like compiling, downloading, or parsing.

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 lacks explicit guidance on when to use this tool versus alternatives. However, given its simple nature and clear distinction from siblings, the intended use is still clear but could be improved with contextual hints.

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

parse_unityfsA

Parse a UnityFS / Addressables bundle, LZ4/LZMA-decompress the first block, and re-parse the directory from the decompressed stream.

The on-disk KSY parse covers the file header + bundle header

  • per-block size records; the directory actually lives inside the decompressed first block (the on-disk format stores compressed block payloads after the per-block size records, and the directory + asset bodies are in those compressed bytes). This helper LZ4 / LZMA-decompresses the requested block and re-parses the Directory sub-type from the decompressed stream.

Args: path: file to parse. ksy_path: optional path to a .ksy to compile on the fly. Defaults to the bundled data/ksy/unity_addressables.ksy (the v0.3 corrected layout). Pass data/ksy/unityfs.ksy for the older bundle_header-wrappered variant. decompress_block: index of the block to re-parse the directory from (default 0, the canonical directory block). Pass -1 to skip the directory re-parse.

Returns: A dict with file_header, bundle_header, decompressed_blocks[] (each with uncompressed_size / compressed_size / decompressed_size / data_b64), and directory (or None if decompress_block=-1).

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
ksy_pathNo
decompress_blockNo

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries full burden and does well: it explains the decompression process, the location of the directory within decompressed blocks, and the special handling of decompress_block=-1. It also details the return structure. However, it could mention potential failures or permission requirements.

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

Conciseness4/5

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

The description is well-structured with separate paragraphs for overview, technical details, args, and returns. It is informative without excess verbosity, though a slightly more condensed initial sentence could improve conciseness.

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 no output schema and no annotations, the description is remarkably complete: it explains the algorithm, the role of different KSY files, parameter behavior, and the exact return format with nested fields. An agent can use this tool confidently without external documentation.

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?

The input schema has zero description coverage, but the description fully explains each parameter: path (file to parse), ksy_path (optional path, default bundled .ksy, and variants), and decompress_block (index, default 0, meaning, and -1 to skip). This adds significant meaning beyond the schema.

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 parses UnityFS/Addressables bundles, decompresses them, and re-parses the directory. It specifies the resource type and action, but does not explicitly distinguish from sibling tools like parse_with_format, which slightly reduces clarity.

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 explicit guidance on when to use this tool versus alternatives (e.g., parse_with_format, diff_parses). The description implies it's for UnityFS bundles but does not state when not to use it or provide context for sibling selection.

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

parse_with_formatA

Parse a binary using either a precompiled module or a fresh .ksy.

Args: path: file to parse format_module: precompiled module (e.g. "kaitaistruct.gif") ksy_path: path to a .ksy file (will be compiled on the fly)

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
format_moduleNo
ksy_pathNo

TDQS

A3.7/5.0
Behavior2/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It explains the two modes (precompiled module vs. on-the-fly compilation) but does not mention side effects, read-only behavior, or error conditions, leaving significant gaps.

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 extremely concise, with a single introductory sentence followed by bullet-pointed parameter explanations. Every sentence adds value, and there is no unnecessary text.

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?

The description covers the main usage scenarios (two modes) but omits details about return values, error handling, and behavior when both optional parameters are provided. It is adequate for basic usage but not comprehensive.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It provides clear, concise explanations for each parameter: 'path' (file to parse), 'format_module' (precompiled module), and 'ksy_path' (path to .ksy), adding meaning beyond the schema's property names.

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's purpose: parsing a binary using either a precompiled module or a .ksy file. It uses a specific verb ('parse') and resource ('binary'), and the distinction from siblings like 'parse_unityfs' is clear.

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 implies when to use the tool (when parsing a binary with a specified format) but does not explicitly compare with sibling tools like 'compile_format' or 'diff_parses'. No when-not-to-use guidance is provided.

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

visualizeB

Return a tree-shaped dict suitable for visualization.

Same as parse_with_format but explicitly named for the "show me the structure of this file" intent.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
format_moduleNo
ksy_pathNo

TDQS

B3/5.0
Behavior2/5

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

With no annotations provided, the description only mentions the output type (tree-shaped dict) but omits any side effects, authentication needs, or rate limits. The behavioral burden is partially met.

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

Conciseness4/5

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

The description is very short (two sentences) and front-loads the core purpose. The second sentence could be more efficient, but overall it's concise.

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

Completeness2/5

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

Given no output schema, the description should explain the return structure or parameter usage. It only mentions shape (tree-shaped) without details, and parameter roles are absent, making it incomplete for effective use.

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

Parameters1/5

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

Schema coverage is 0%, meaning the input schema provides no descriptions. The tool description adds no information about the parameters (path, format_module, ksy_path), leaving the agent uninformed.

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 states it returns a tree-shaped dict for visualization and distinguishes from the sibling 'parse_with_format' by intent. However, it doesn't fully explain what the tool does with inputs.

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

Usage Guidelines4/5

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

It indicates usage when the user wants to see the structure of a file ('show me the structure'), providing clear context. No explicit when-not or alternatives besides the sibling.

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

TDQS

B3.2/5.0
Disambiguation4/5

Most tools have distinct purposes, but visualize is explicitly described as identical to parse_with_format, causing confusion. One overlapping pair reduces clarity.

Naming Consistency3/5

Mix of verb_noun and verb patterns; 'visualize' is a single verb unlike others, and 'parse_with_format' uses 'with' breaking the convention. Inconsistent but still readable.

Tool Count5/5

8 tools is well-scoped for a Kaitai Struct parsing server, covering compilation, parsing, downloading, listing, diffing, and a specialized format. No unnecessary tools.

Completeness4/5

Covers core workflows (compile, parse, diff, download, list), but lacks tools for format creation or conversion. Minor gaps, e.g., no way to inspect precompiled modules.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/Heretek-RE/re-kaitai'

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