From c18eed0164c170a36398c149ca831023824f2368 Mon Sep 17 00:00:00 2001 From: Zyan Date: Fri, 28 Aug 2026 15:35:37 -0600 Subject: [PATCH 1/3] Add queryresultmode per issue #1048 Documents the new query_result_mode optional parameter in SpannerToolSettings, which configures the execute_sql tool to return database query results as a list of dictionaries. --- docs/integrations/spanner.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/integrations/spanner.md b/docs/integrations/spanner.md index ddd47e99c5..888048c748 100644 --- a/docs/integrations/spanner.md +++ b/docs/integrations/spanner.md @@ -142,6 +142,10 @@ The `SpannerVectorStoreSettings` class used above defines how as `COSINE` or `EUCLIDEAN`. - **`additional_filter`**: An optional SQL filter string to apply during the search, for example: "inventoryCount > 0". +- **`query_result_mode`**: Determines the format in + which the `execute_sql` tool returns database query results. Setting this + parameter to `QueryResultMode.DICT_LIST` configures the tool to return the + results as a list of dictionaries. ## Spanner Admin Toolset From 40cd32bcc88cc51d7119b0b61a8b940b909ca50a Mon Sep 17 00:00:00 2001 From: Zyan Date: Fri, 18 Sep 2026 14:15:59 -0600 Subject: [PATCH 2/3] Update spanner.md Resolves comments and feedback. --- docs/integrations/spanner.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/integrations/spanner.md b/docs/integrations/spanner.md index 888048c748..f7d62ff53f 100644 --- a/docs/integrations/spanner.md +++ b/docs/integrations/spanner.md @@ -32,6 +32,12 @@ The `SpannerToolset` provides the following tools: - **`get_table_schema`**: Fetches Spanner database table schema and metadata information. - **`execute_sql`**: Runs a SQL query in Spanner database and fetch the result. +- **`query_result_mode`**: Determines the format in + which the `execute_sql` tool returns database query results. Setting this + parameter to `QueryResultMode.DICT_LIST` configures the tool to return the + results as a list of dictionaries. The default, `QueryResultMode.DEFAULT`, + returns each row as a list of values. Import `QueryResultMode` from + `google.adk.tools.spanner.settings`. Available in Python v1.21.0 and later. - **`similarity_search`**: Similarity search in Spanner using a text query. ## Use with agent @@ -142,10 +148,6 @@ The `SpannerVectorStoreSettings` class used above defines how as `COSINE` or `EUCLIDEAN`. - **`additional_filter`**: An optional SQL filter string to apply during the search, for example: "inventoryCount > 0". -- **`query_result_mode`**: Determines the format in - which the `execute_sql` tool returns database query results. Setting this - parameter to `QueryResultMode.DICT_LIST` configures the tool to return the - results as a list of dictionaries. ## Spanner Admin Toolset From 593cdd9a1a2136ea27ddea1f903d1ef3826bddd9 Mon Sep 17 00:00:00 2001 From: Zyan Date: Fri, 18 Sep 2026 14:23:30 -0600 Subject: [PATCH 3/3] Update spanner.md --- docs/integrations/spanner.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/integrations/spanner.md b/docs/integrations/spanner.md index f7d62ff53f..eaf69ea897 100644 --- a/docs/integrations/spanner.md +++ b/docs/integrations/spanner.md @@ -35,9 +35,8 @@ The `SpannerToolset` provides the following tools: - **`query_result_mode`**: Determines the format in which the `execute_sql` tool returns database query results. Setting this parameter to `QueryResultMode.DICT_LIST` configures the tool to return the - results as a list of dictionaries. The default, `QueryResultMode.DEFAULT`, - returns each row as a list of values. Import `QueryResultMode` from - `google.adk.tools.spanner.settings`. Available in Python v1.21.0 and later. + results as a list of dictionaries. Import `QueryResultMode` from + `google.adk.tools.spanner.settings`. - **`similarity_search`**: Similarity search in Spanner using a text query. ## Use with agent