retroarch_get_config
Read a single RetroArch configuration parameter by name from a running emulator via NCI, revealing paths and settings without parsing retroarch.cfg manually.
Instructions
PURPOSE: Read a single RetroArch configuration parameter by name via the NCI GET_CONFIG_PARAM command. USAGE: Discover RetroArch's filesystem paths and selected settings without parsing retroarch.cfg yourself. For run-state (playing/paused, loaded ROM) use retroarch_get_status instead — this tool only reads static config. RetroArch whitelists which params are exposed; non-whitelisted names error even if they exist in retroarch.cfg. screenshot_directory is NOT exposed — see retroarch_screenshot. BEHAVIOR: No side effects — pure read. Transport: RetroArch's Network Control Interface (NCI) over UDP (default 127.0.0.1:55355, requires network_cmd_enable = true in retroarch.cfg). Errors if the param isn't in RetroArch's NCI whitelist, the value contains characters that break the line-based reply parser (rare — embedded newlines or null bytes), or the UDP query times out. RETURNS: 'NAME = VALUE' where VALUE is the raw string as stored in retroarch.cfg (paths unquoted, booleans as 'true'/'false', integers as decimal).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Config key — same snake_case ASCII identifier RetroArch uses in retroarch.cfg, case-sensitive, no surrounding quotes. Path-class keys (return absolute paths on disk): `savefile_directory`, `savestate_directory`, `system_directory`, `cache_directory`, `log_dir`, `runtime_log_directory`, `core_assets_directory`. User-data keys: `netplay_nickname`. Toggle keys (return 'true' / 'false'): `video_fullscreen`, `video_vsync`, `audio_mute_enable`. The full whitelist varies per RetroArch build; if a key returns an error rather than a value, it's not exposed via the NCI on this build. Notable exclusions: `screenshot_directory` is intentionally NOT exposed by RetroArch (see retroarch_screenshot for the workaround). Also no key for the currently-selected savestate slot — track that client-side via retroarch_state_slot_plus/minus. |