# Galaxy Tool XML File The XML File for a Galaxy tool, generally referred to as the "tool config file" or "wrapper", serves a number of purposes. First, it lays out the user interface for the tool (e.g. form fields, text, help, etc.). Second, it provides the glue that links your tool to Galaxy by telling Galaxy how to invoke it, what options to pass, and what files it will produce as output. If you find a bug please report it [here](https://github.com/galaxyproject/galaxy/issues/new). This document serves as reference documentation. If you would like to learn how to build tools for Galaxy, [Planemo](https://planemo.readthedocs.io/en/latest/writing.html) features a number of tutorials on building Galaxy tools that would better serve that purpose. ## Contents * [``tool``](#tool) * [``tool`` > ``description``](#tool-description) * [``tool`` > ``macros``](#tool-macros) * [``tool`` > ``edam_topics``](#tool-edam-topics) * [``tool`` > ``edam_operations``](#tool-edam-operations) * [``tool`` > ``xrefs``](#tool-xrefs) * [``tool`` > ``xrefs`` > ``xref``](#tool-xrefs-xref) * [``tool`` > ``creator``](#tool-creator) * [``tool`` > ``creator`` > ``person``](#tool-creator-person) * [``tool`` > ``creator`` > ``organization``](#tool-creator-organization) * [``tool`` > ``requirements``](#tool-requirements) * [``tool`` > ``requirements`` > ``requirement``](#tool-requirements-requirement) * [``tool`` > ``requirements`` > ``container``](#tool-requirements-container) * [``tool`` > ``required_files``](#tool-required-files) * [``tool`` > ``required_files`` > ``include``](#tool-required-files-include) * [``tool`` > ``required_files`` > ``exclude``](#tool-required-files-exclude) * [``tool`` > ``code``](#tool-code) * [``tool`` > ``stdio``](#tool-stdio) * [``tool`` > ``stdio`` > ``exit_code``](#tool-stdio-exit-code) * [``tool`` > ``stdio`` > ``regex``](#tool-stdio-regex) * [``tool`` > ``version_command``](#tool-version-command) * [``tool`` > ``command``](#tool-command) * [``tool`` > ``environment_variables``](#tool-environment-variables) * [``tool`` > ``environment_variables`` > ``environment_variable``](#tool-environment-variables-environment-variable) * [``tool`` > ``configfiles``](#tool-configfiles) * [``tool`` > ``configfiles`` > ``configfile``](#tool-configfiles-configfile) * [``tool`` > ``configfiles`` > ``inputs``](#tool-configfiles-inputs) * [``tool`` > ``inputs``](#tool-inputs) * [``tool`` > ``inputs`` > ``section``](#tool-inputs-section) * [``tool`` > ``inputs`` > ``repeat``](#tool-inputs-repeat) * [``tool`` > ``inputs`` > ``conditional``](#tool-inputs-conditional) * [``tool`` > ``inputs`` > ``conditional`` > ``when``](#tool-inputs-conditional-when) * [``tool`` > ``inputs`` > ``param``](#tool-inputs-param) * [``tool`` > ``inputs`` > ``param`` > ``validator``](#tool-inputs-param-validator) * [``tool`` > ``inputs`` > ``param`` > ``option``](#tool-inputs-param-option) * [``tool`` > ``inputs`` > ``param`` > ``conversion``](#tool-inputs-param-conversion) * [``tool`` > ``inputs`` > ``param`` > ``options``](#tool-inputs-param-options) * [``tool`` > ``inputs`` > ``param`` > ``options`` > ``column``](#tool-inputs-param-options-column) * [``tool`` > ``inputs`` > ``param`` > ``options`` > ``filter``](#tool-inputs-param-options-filter) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer``](#tool-inputs-param-sanitizer) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer`` > ``valid``](#tool-inputs-param-sanitizer-valid) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer`` > ``valid`` > ``add``](#tool-inputs-param-sanitizer-valid-add) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer`` > ``valid`` > ``remove``](#tool-inputs-param-sanitizer-valid-remove) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer`` > ``mapping``](#tool-inputs-param-sanitizer-mapping) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer`` > ``mapping`` > ``add``](#tool-inputs-param-sanitizer-mapping-add) * [``tool`` > ``inputs`` > ``param`` > ``sanitizer`` > ``mapping`` > ``remove``](#tool-inputs-param-sanitizer-mapping-remove) * [``tool`` > ``request_param_translation``](#tool-request-param-translation) * [``tool`` > ``request_param_translation`` > ``request_param``](#tool-request-param-translation-request-param) * [``tool`` > ``request_param_translation`` > ``request_param`` > ``append_param``](#tool-request-param-translation-request-param-append-param) * [``tool`` > ``request_param_translation`` > ``request_param`` > ``append_param`` > ``value``](#tool-request-param-translation-request-param-append-param-value) * [``tool`` > ``request_param_translation`` > ``request_param`` > ``value_translation``](#tool-request-param-translation-request-param-value-translation) * [``tool`` > ``request_param_translation`` > ``request_param`` > ``value_translation`` > ``value``](#tool-request-param-translation-request-param-value-translation-value) * [``tool`` > ``outputs``](#tool-outputs) * [``tool`` > ``outputs`` > ``data``](#tool-outputs-data) * [``tool`` > ``outputs`` > ``data`` > ``filter``](#tool-outputs-data-filter) * [``tool`` > ``outputs`` > ``data`` > ``change_format``](#tool-outputs-data-change-format) * [``tool`` > ``outputs`` > ``data`` > ``change_format`` > ``when``](#tool-outputs-data-change-format-when) * [``tool`` > ``outputs`` > ``data`` > ``actions``](#tool-outputs-data-actions) * [``tool`` > ``outputs`` > ``data`` > ``actions`` > ``conditional``](#tool-outputs-data-actions-conditional) * [``tool`` > ``outputs`` > ``data`` > ``actions`` > ``conditional`` > ``when``](#tool-outputs-data-actions-conditional-when) * [``tool`` > ``outputs`` > ``data`` > ``actions`` > ``action``](#tool-outputs-data-actions-action) * [``tool`` > ``outputs`` > ``data`` > ``discover_datasets``](#tool-outputs-data-discover-datasets) * [``tool`` > ``outputs`` > ``collection``](#tool-outputs-collection) * [``tool`` > ``outputs`` > ``collection`` > ``filter``](#tool-outputs-collection-filter) * [``tool`` > ``outputs`` > ``collection`` > ``discover_datasets``](#tool-outputs-collection-discover-datasets) * [``tool`` > ``tests``](#tool-tests) * [``tool`` > ``tests`` > ``test``](#tool-tests-test) * [``tool`` > ``tests`` > ``test`` > ``param``](#tool-tests-test-param) * [``tool`` > ``tests`` > ``test`` > ``param`` > ``collection``](#tool-tests-test-param-collection) * [``tool`` > ``tests`` > ``test`` > ``repeat``](#tool-tests-test-repeat) * [``tool`` > ``tests`` > ``test`` > ``section``](#tool-tests-test-section) * [``tool`` > ``tests`` > ``test`` > ``conditional``](#tool-tests-test-conditional) * [``tool`` > ``tests`` > ``test`` > ``output``](#tool-tests-test-output) * [``tool`` > ``tests`` > ``test`` > ``output`` > ``discover_dataset``](#tool-tests-test-output-discover-dataset) * [``tool`` > ``tests`` > ``test`` > ``output`` > ``metadata``](#tool-tests-test-output-metadata) * [``tool`` > ``tests`` > ``test`` > ``output`` > ``assert_contents``](#tool-tests-test-output-assert-contents) * [``tool`` > ``tests`` > ``test`` > ``output_collection``](#tool-tests-test-output-collection) * [``tool`` > ``tests`` > ``test`` > ``assert_command``](#tool-tests-test-assert-command) * [``tool`` > ``tests`` > ``test`` > ``assert_stdout``](#tool-tests-test-assert-stdout) * [``tool`` > ``tests`` > ``test`` > ``assert_stderr``](#tool-tests-test-assert-stderr) * [``tool`` > ``help``](#tool-help) * [``tool`` > ``citations``](#tool-citations) * [``tool`` > ``citations`` > ``citation``](#tool-citations-citation) ## ``tool`` The outer-most tag set of tool XML files. Attributes on this tag apply to the tool as a whole. ### Tool profile List of behavior changes associated with profile versions: #### 16.04 - Disable implicit extra file collection. All dynamic extra file collection requires a `discover_datasets` tag. - Disable `format="input"` and require explicit metadata targets (`metadata_source`, `format_source`). - Disable `interpreter` use `$__tool_directory__`. - Disable `$param_file` use `configfile`. - Disable default tool version of 1.0.0. - Use non zero exit code as default stdio error condition (before non-empty stderr). #### 18.01 - Use a separate home directory for each job. - Introduce `provided_metadata_style` with default `"default"` before `"legacy"`. #### 18.09 - References to other inputs need to be fully qualified by using `|`. - Do not allow provided but illegal default values. - Do not use Galaxy python environment for `manage_data` tools. #### 19.05 - Change default Python version from 2.7 to 3.5 #### 20.05 - json config files: - unselected optional `select` and `data_column` parameters get `None` instead of `"None"` - multiple `select` and `data_column` parameters are lists (before comma separated string) #### 20.09 - Exit immediately if a command exits with a non-zero status (`set -e`). - Assume sort order for collection elements. ### 21.09 - Do not strip leading and trailing whitespaces in `from_work_dir` attribute. ### Examples A normal tool: ```xml ``` A ``data_source`` tool contains a few more relevant attributes. ```xml