> This page is for Voice Agents.

> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> Building a voice agent for customers in India? Start with Sarvam Voice Agents, a managed platform with Indian-language speech, telephony, testing, and analytics from ₹3 per minute: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Mocking a tool

> Use the Mock API tool in Sarvam Voice Agents to test tool calls end to end against an echo endpoint before your real backend exists, then swap in your API.

Add a **Mock API tool** to test an agent before your real backend exists. It's a separate tool from the [API tool](/voice-agents/build/tools/https-tool) and uses Postman Echo (`postman-echo.com`) as its endpoint - whatever payload the agent sends, it gets back unchanged, so you can wire up and test tool calls end to end without a real backend.

You can also just ask [Genie](/voice-agents/build/genie) to set up the Mock API tool for you.

Use it to rehearse a tool in [test agent](/voice-agents/build/navigating-workspace#testing-the-agent) before pointing it at your production API. Once you're happy with the agent, remove the Mock API tool and connect your real endpoint using the [API tool](/voice-agents/build/tools/https-tool).