'GET /api/tools/{tool_id}/build
Returns a tool model including dynamic parameters and updated values, repeats block etc.'

@expose_api_anonymous
def build(self, trans, id, **kwd):

    if ('payload' in kwd):
        kwd = kwd.get('payload')
    tool_version = kwd.get('tool_version', None)
    tool = self._get_tool(id, tool_version=tool_version, user=trans.user)
    return tool.to_json(trans, kwd.get('inputs', kwd))
