Skip to content

Commit a4b0c66

Browse files
authored
Merge pull request aden-hive#558 from Hundao/feature/csv-tools
feat(tools): add CSV tools with DuckDB SQL support
2 parents bc8cdfd + d558bf4 commit a4b0c66

5 files changed

Lines changed: 1192 additions & 0 deletions

File tree

tools/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ ocr = [
4242
"pytesseract>=0.3.10",
4343
"pillow>=10.0.0",
4444
]
45+
sql = [
46+
"duckdb>=1.0.0",
47+
]
4548
all = [
4649
"RestrictedPython>=7.0",
4750
"pytesseract>=0.3.10",
4851
"pillow>=10.0.0",
52+
"duckdb>=1.0.0",
4953
]
5054

5155
[build-system]

tools/src/aden_tools/tools/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from .file_system_toolkits.apply_patch import register_tools as register_apply_patch
3333
from .file_system_toolkits.grep_search import register_tools as register_grep_search
3434
from .file_system_toolkits.execute_command_tool import register_tools as register_execute_command
35+
from .csv_tool import register_tools as register_csv
3536

3637

3738
def register_all_tools(
@@ -69,6 +70,7 @@ def register_all_tools(
6970
register_apply_patch(mcp)
7071
register_grep_search(mcp)
7172
register_execute_command(mcp)
73+
register_csv(mcp)
7274

7375
return [
7476
"example_tool",
@@ -83,6 +85,11 @@ def register_all_tools(
8385
"apply_patch",
8486
"grep_search",
8587
"execute_command_tool",
88+
"csv_read",
89+
"csv_write",
90+
"csv_append",
91+
"csv_info",
92+
"csv_sql",
8693
]
8794

8895

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""CSV Tool package."""
2+
from .csv_tool import register_tools
3+
4+
__all__ = ["register_tools"]

0 commit comments

Comments
 (0)