# get_current_thread_id

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tools/get_current_thread_id)

Get the current Deep Agents thread ID for LangSmith or MCP tooling.

## Signature

```python
get_current_thread_id() -> str
```

## Returns

`str`

The current `configurable.thread_id`, or an explanatory message if missing.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/6a8d452d70f9bcb978e6bd44831dda093ecbe928/libs/code/deepagents_code/tools.py#L398)