Image copyright Getty Images

Boris Johnson's job as foreign secretary was to convince the world that Brexit did not mean Britain's withdrawal from global affairs. It is a task that few historians will conclude Mr Johnson achieved.

On Monday, he was supposed to be chairing a summit in London on the Western Balkans to show the UK's continuing commitment to European security.

Instead, foreign ministers tweeted their frustration at the absence of their host as he agonised about his future.

This week is a moment when Britain's voice is meant to be heard - at the Nato summit in Brussels and during President Trump's visit to the UK.

There is diplomacy to be done after the death of a British national from what is suspected to be a Russian nerve agent attack, a shocking event that has been overshadowed by the latest dramas over Brexit.

Instead, the departure of Mr Johnson will add to the uncertainty that diplomats and politicians from overseas feel about Britain's foreign policy.

Image caption Boris Johnson surveying destruction in the British Virgin Islands in the wake of Hurricane Irma

When Mr Johnson was appointed two years ago, there was hope that his charm and intelligence could turn into statesmanship. Diplomats warmed to this multilingual maverick - here at last was a foreign secretary with some political star quality, who could get Britain heard on the international stage.

And certainly at early international meetings, I watched as Mr Johnson was mobbed by fellow ministers seeking selfies with a tousle-haired phenomenon tipped as a future prime minister.

But soon hope turned to disappointment. The repeated gaffes and inappropriate remarks often undermined any progress Mr Johnson made with Britain's allies and opponents. There were the jokes about dead bodies in Libya and the recitation of inappropriate verses by Rudyard Kipling in Myanmar.

And there was his inaccurate suggestion that the detained British Iranian national Nazanin Zaghari Ratcliffe had been in Iran training journalists, which her family and supporters said had damaged their campaign to secure her release.

Image copyright Getty Images Image caption Boris Johnson during a press conference in Libya in 2017

Of course, some of the jokes worked and some politicians overseas warmed to the entertaining foreign minister from Britain. There were times when Mr Johnson was an effective minister for foreign affairs.

I travelled with him to Libya last year and he met the right people, said the right things, caused no offence and placed the UK firmly in the mix as an international player in that part of north Africa.

There were moments in other diplomatic forums, such as meetings with Burmese officials at the United Nations, where Mr Johnson's charm kept the show on the road by sheer force of personality.

But there was often frustration at the lack of substance. Foreign envoys would sometimes tell me they couldn't fill their telegrams home simply with jokes written by Boris Johnson.

On one occasion, President Sisi of Egypt simply walked out of a meeting with a rather bemused foreign secretary simply because the conversation did not get beyond the pleasantries.

Image copyright Getty Images Image caption Boris Johnson with Russia's Sergei Lavrov in Moscow in December 2017

Above all, Mr Johnson struggled to set out clearly what the government's "global Britain" foreign policy actually meant. His focus on women's education and saving elephants rarely formed part of a bigger picture.

What is Britain's response to the rise of countries such as China and India? What is Britain's thinking on the long term pressures of migration from sub-Saharan Africa, where a demographic explosion is expected in coming decades?

What is the solution to the government's contradictory policy towards the conflict in Yemen, where Britain sells arms to one side, Saudi Arabia, while giving foreign aid to the other, the civilians left injured and hungry by the fighting? What is Britain's approach to issues such as Syria and North Korea?

These are all questions that still require answers. And that is on top of the questions posed by Brexit and Britain's uncertain relationship with an increasingly independent-minded United States led by Donald Trump.

The former Swedish prime minister Carl Bildt tweeted on Monday that Britain "used to be a nation providing leadership to the world - now, it can't even provide leadership to itself".

British diplomats would challenge such a sweeping assertion and cite the way the UK convinced 28 countries to expel 150 Russian diplomats after the Salisbury nerve agent attack as an example of global leadership. But the question remains: what is British foreign policy? And it is a question that Boris Johnson's successor will have to answer.