'GET /api/tools
Displays a collection of tools with optional criteria.
:param q:        (optional)if present search on the given query will be performed
:type  q:        str
:param page:     (optional)requested page of the search
:type  page:     int
:param page_size:     (optional)requested page_size of the search
:type  page_size:     int
:param jsonp:    (optional)flag whether to use jsonp format response, defaults to False
:type  jsonp:    bool
:param callback: (optional)name of the function to wrap callback in
used only when jsonp is true, defaults to \'callback\'
:type  callback: str
:returns dict:   object containing list of results and metadata
Examples:
GET http://localhost:9009/api/tools
GET http://localhost:9009/api/tools?q=fastq'

@expose_api_raw_anonymous_and_sessionless
def index(self, trans, **kwd):

    q = kwd.get('q', '')
    if (not q):
        raise NotImplemented('Listing    of    all    the    tools    is    not    implemented.    Provide    parameter    "q"    to    search    instead.')
    else:
        page = kwd.get('page', 1)
        page_size = kwd.get('page_size', 10)
        try:
            page = int(page)
            page_size = int(page_size)
        except ValueError:
            raise RequestParameterInvalidException('The    "page"    and    "page_size"    have    to    be    integers.')
        return_jsonp = util.asbool(kwd.get('jsonp', False))
        callback = kwd.get('callback', 'callback')
        search_results = self._search(trans, q, page, page_size)
        if return_jsonp:
            response = str(('%s(%s);' % (callback, json.dumps(search_results))))
        else:
            response = json.dumps(search_results)
        return response
