     }
   ]
 
+  buildDefinitionsTableDefinition = [
+    {
+      "label" : "ID",
+      "field" : "id",
+      "length" : 5
+    },
+    {
+      "label" : "Name",
+      "field" : "name",
+      "length" : 30
+    }
+  ]
+
   asciiTable = new AsciiTable()
 
   # Check for required config

      tfsCollection = tfsDefaultCollection

    if tfsPort?
      tfsURL = "#{tfsProtocol}://#{tfsServer}:#{tfsPort}#{tfsURLPrefix}#{tfsCollection}/#{tfsProject}/#{tfsBuildListAPICall}"
    else
      tfsURL = "#{tfsProtocol}://#{tfsServer}#{tfsURLPrefix}#{tfsCollection}/#{tfsProject}/#{tfsBuildListAPICall}"

    tfsApiCall = {
      "url": tfsURL,
      "username": tfsUsername,

        return
      else
        result = JSON.parse apiCallRes.body
        res.reply "Found #{result.count} results for #{tfsProject} in #{tfsCollection}"
        tableResult = asciiTable.buildTable(tableDefinition, result.value)
        res.reply tableResult



  ##########################################################
  #                       COMMAND
  # hubot tfs build list SpidersFromMars
  # hubot tfs build list SpidersFromMars from MyCollection
  ##########################################################
  robot.respond /tfs build list (\S*)(?: from )?(\S*)/, (res) ->
    doRespond(res, tfsBuildListAPICall, buildListTableDefinition)

  robot.respond /tfs build definitions (\S*)(?: from )?(\S*)/, (res) ->
    doRespond(res, tfsBuildDefinitionsAPICall, buildDefinitionsTableDefinition)


  robot.hear /orly/, (res) ->
