res = demisto.executeCommand('getContext', {})
if isError(res[0]):
    demisto.results(res)
else:
    md = "**Context data**:\n" + json.dumps(res[0]['Contents'], indent=4)
    demisto.results({'ContentsFormat': formats['markdown'], 'Type': entryTypes['note'], 'Contents': md})

md = "**Context data**:\n```\n" + json.dumps(demisto.context(), indent=4) + '\n```'
demisto.results({'ContentsFormat': formats['markdown'], 'Type': entryTypes['note'], 'Contents': md})


Fix PrintContext to use built-in context data