read_config
Read and parse service configuration files from JSON, YAML, INI, TOML, and more. Specify a service name to auto-locate configs or a custom path for direct access.
Instructions
Read and parse a specific service configuration file. Supports JSON, YAML, INI, TOML, env, nginx conf, sshd_config, sysctl, crontab, hosts, fstab, resolv.conf, and more. You can specify either a service name (e.g. 'nginx') to auto-locate the config, or provide a direct file path for custom configs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Direct absolute path to a config file. Use this for custom configs not in the known list. If both 'service' and 'path' are provided, 'path' takes priority. | |
| format | No | Optional format hint. If omitted, the format is auto-detected from the file extension. Use 'raw' to get unprocessed file content. | |
| service | No | Service name to read config for (e.g. 'nginx', 'mysql', 'redis', 'sshd', 'docker', 'hosts', 'fstab'). The tool will auto-locate the config file. Available services: nginx, apache, caddy, traefik, haproxy, mysql, postgresql, redis, mongodb, elasticsearch, rabbitmq, memcached, docker, docker-compose, containerd, kubernetes-kubelet, sshd, ssh-client, fail2ban, ufw, sysctl, fstab, hosts, resolv, crontab, logrotate, limits, supervisord, pm2, php-fpm, gunicorn, prometheus, grafana, rsyslog, bind, wsl, windows-terminal, vscode, npm, ssh-user, bash-profile | |
| maxSizeKB | No | Maximum file size to read in KB. Default: 512. Increase for large configs. | |
| compactMode | No | Optional token-saving mode. Use 'keys-only' for huge JSON/YAML files to only return the schema/structure without all the values. Great for AI context saving. |