import_file
Import a binary file into a Ghidra project and open it in CodeBrowser. Optionally start auto-analysis; specify language for raw firmware or rely on auto-detection for known formats.
Instructions
Import a binary file from disk into the current Ghidra project.
Imports the file, opens it in the CodeBrowser, and optionally starts auto-analysis. When analysis is enabled, sends a log notification when analysis completes.
For raw firmware binaries, specify language (e.g. "ARM:LE:32:Cortex") and optionally compiler_spec (e.g. "default"). Without language, Ghidra auto-detects the format (works for ELF, PE, Mach-O, etc.).
Args: file_path: Absolute path to the binary file on disk project_folder: Destination folder in the Ghidra project (default: "/") language: Language ID for raw binaries (e.g. "ARM:LE:32:Cortex", "x86:LE:64:default") compiler_spec: Compiler spec ID (e.g. "default", "gcc"). Uses language default if omitted. auto_analyze: Start auto-analysis after import (default: true)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "import_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ||
| file_path | Yes | ||
| auto_analyze | No | ||
| compiler_spec | No | ||
| project_folder | No | / |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |