Duplicate tool calls when user repeats information

This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.

I’m using an MCP server for my tools with a LiveKit agent. After the user confirms their name, the LLM calls a tool to create an appointment. But if the user says their name multiple times and speech is being transcribed, the LLM calls the tool multiple times.

LiveKit is discarding the first tool call result and the LLM can only see the response from the second call. Has anybody faced this issue?

You might want to look at Tasks for this use case:

Tasks let you retrieve the user’s name before moving onto the create_appointment stage in your workflow, preventing the duplicate tool call issue.