Skip to content

Commit a27927d

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: Add spanner tool name prefix
PiperOrigin-RevId: 795339631
1 parent 6c217ba commit a27927d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/google/adk/tools/spanner/spanner_toolset.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,21 @@
3232
from .settings import SpannerToolSettings
3333
from .spanner_credentials import SpannerCredentialsConfig
3434

35+
DEFAULT_SPANNER_TOOL_NAME_PREFIX = "spanner"
36+
3537

3638
@experimental
3739
class SpannerToolset(BaseToolset):
38-
"""Spanner Toolset contains tools for interacting with Spanner data, database and table information."""
40+
"""Spanner Toolset contains tools for interacting with Spanner data, database and table information.
41+
42+
The tool names are:
43+
- spanner_list_table_names
44+
- spanner_list_table_indexes
45+
- spanner_list_table_index_columns
46+
- spanner_list_named_schemas
47+
- spanner_get_table_schema
48+
- spanner_execute_sql
49+
"""
3950

4051
def __init__(
4152
self,
@@ -44,7 +55,10 @@ def __init__(
4455
credentials_config: Optional[SpannerCredentialsConfig] = None,
4556
spanner_tool_settings: Optional[SpannerToolSettings] = None,
4657
):
47-
super().__init__(tool_filter=tool_filter)
58+
super().__init__(
59+
tool_filter=tool_filter,
60+
tool_name_prefix=DEFAULT_SPANNER_TOOL_NAME_PREFIX,
61+
)
4862
self._credentials_config = credentials_config
4963
self._tool_settings = (
5064
spanner_tool_settings

0 commit comments

Comments
 (0)