import_file
Imports a binary from disk into the current Ghidra project, opens it in CodeBrowser, and optionally runs auto-analysis; specify language for raw firmware when needed.
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 | Language ID for raw binaries (e.g. "ARM:LE:32:Cortex", "x86:LE:64:default") | |
| file_path | Yes | Absolute path to the binary file on disk | |
| auto_analyze | No | Start auto-analysis after import (default: true) | |
| compiler_spec | No | Compiler spec ID (e.g. "default", "gcc"). Uses language default if omitted. | |
| project_folder | No | Destination folder in the Ghidra project (default: "/") | / |