***

title: remove_global_data
slug: /reference/python/agents/function-result/remove-global-data
description: Remove one or more keys from the global session data.
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

Remove one or more keys from the global session data.

## **Parameters**

<ParamField path="keys" type="str | list[str]" required={true} toc={true}>
  A single key string or a list of key strings to remove from global data.
</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="clear_session_data", description="Clear session data")
def clear_session_data(args, raw_data):
    return (
        FunctionResult("Session data cleared.")
        .remove_global_data(["customer_id", "verified"])
    )

agent.serve()
```