add custom tool example
diff --git a/examples/di/custom_tool.py b/examples/di/custom_tool.py
new file mode 100644
index 000000000..cbe7380c7
--- /dev/null
+++ b/examples/di/custom_tool.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+@Time    : 2024/3/22 10:54
+@Author  : alexanderwu
+@File    : custom_tool.py
+"""
+
+from metagpt.roles.di.data_interpreter import DataInterpreter
+from metagpt.tools.tool_registry import register_tool
+
+
+@register_tool()
+def magic_function(arg1: str, arg2: int) -> dict:
+    """
+    The magic function that does something.
+
+    Args:
+        arg1 (str): ...
+        arg2 (int): ...
+
+    Returns:
+        dict: ...
+    """
+    return {"arg1": arg1 * 3, "arg2": arg2 * 5}
+
+
+async def main():
+    di = DataInterpreter(tools=["magic_function"])
+    await di.run("Just call the magic function with arg1 'A' and arg2 2. Tell me the result.")
+
+
+if __name__ == "__main__":
+    import asyncio
+
+    asyncio.run(main())

**Features**
<!-- Clear and direct description of the submit features. -->
<!-- If it's a bug fix, please also paste the issue link. -->

- add a example of DataInterpreter for using custom tool.
    
**Feature Docs**
<!-- The RFC, tutorial, or use cases about the feature if it's a pretty big update. If not, there is no need to fill. -->

**Influence**
<!-- Tell me the impact of the new feature and I'll focus on it.  -->
Solve https://github.com/geekan/MetaGPT/issues/1034

**Result**
<!-- The screenshot/log of unittest/running result -->
![image](https://github.com/geekan/MetaGPT/assets/2707039/b160eb7f-55f7-46aa-bea9-d18e2b1dcc21)

**Other**
<!-- Something else about this PR. -->