***

title: stop_tap
slug: /reference/python/agents/function-result/stop-tap
description: Stop an active media tap stream.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[functionresult]: /docs/server-sdks/reference/python/agents/function-result

Stop an active media tap stream.

## **Parameters**

<ParamField path="control_id" type="Optional[str]" default="None" toc={true}>
  Identifier of the tap to stop. If not provided, the most recently started
  tap is stopped.
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] — self, for chaining.

## **Example**

```python {11}
from signalwire import AgentBase
from signalwire import FunctionResult

agent = AgentBase(name="my-agent", route="/agent")
agent.set_prompt_text("You are a helpful assistant.")

@agent.tool(name="stop_monitoring", description="Stop monitoring the call")
def stop_monitoring(args, raw_data):
    return (
        FunctionResult("Monitoring stopped.")
        .stop_tap(control_id="supervisor_tap")
    )

agent.serve()
```