'Returns definition of an interactive tool for an HDA.'

def get_tool_def(self, trans, hda):

    job = None
    for job_output_assoc in hda.creating_job_associations:
        job = job_output_assoc.job
        break
    if (not job):
        return None
    tool = trans.app.toolbox.get_tool(job.tool_id, tool_version=job.tool_version)
    if (not tool):
        return None
    if (not tool.trackster_conf):
        return None
    tool_dict = tool.to_dict(trans, io_details=True)
    tool_param_values = dict([(p.name, p.value) for p in job.parameters])
    tool_param_values = tool.params_from_strings(tool_param_values, trans.app, ignore_errors=True)
    inputs_dict = [i for i in tool_dict['inputs'] if (i['type'] not in ['data', 'hidden_data', 'conditional'])]
    for t_input in inputs_dict:
        if ('name' in t_input):
            name = t_input['name']
            if (name in tool_param_values):
                value = tool_param_values[name]
                if isinstance(value, Dictifiable):
                    value = value.to_dict()
                t_input['value'] = value
    return tool_dict
