'Handle a request from a Galaxy instance to get the tool_dependencies entry from the metadata
for a specified changeset revision.'

@web.expose
def get_tool_dependencies(self, trans, **kwd):

    name = kwd.get('name', None)
    owner = kwd.get('owner', None)
    changeset_revision = kwd.get('changeset_revision', None)
    repository = repository_util.get_repository_by_name_and_owner(trans.app, name, owner)
    dependencies = repository.get_tool_dependencies(trans.app, changeset_revision)
    if (len(dependencies) > 0):
        return encoding_util.tool_shed_encode(dependencies)
    return ''
