fix: return object_details as structured JSON in Spanner list tables tool#1894
Conversation
…ave nested json in spannerlisttables
|
agent readability of output comparision adk agentqueries = [
"can you list all table name simple?",
"can you get me detailed info about Products?",
]main branchrespose to first queryHere are the table names in your Spanner database: Account, AccountTransferAccount, Accounts, Customers, Follows, Knows, Person, Persons, and Products. respose to second queryHere are the detailed schema information for the table Schema Name: (empty string) Columns:
Constraints:
Indexes:
nested jsonrespose to first queryHere are the table names in your database: Account, AccountTransferAccount, Accounts, Customers, Follows, Knows, Person, Persons, and Products. respose to second queryHere are the details for the
gemini climain branch
✦ The table names in Spanner are: Account, AccountTransferAccount, Accounts, Customers, Follows,
╭────────────────────────────────────────────────────────────────────────────────────────────────╮ Table Name: Products Columns:
Constraints:
Indexes:
nested json
╭────────────────────────────────────────────────────────────────────────────────────────────────╮
╭────────────────────────────────────────────────────────────────────────────────────────────────╮
It has a primary key constraint on ProductID and a check constraint ensuring ProductID is not |
@gRedHeadphone please make the following changes:
It would also be nice to move this discussion to the issue. This way, the PR can stay focussed on the code and basic design while the issue contains all the discussions and decisions for future reference. |
Why does A2 for main branch have this: but not the A2 for the nested json? |
Can you clarify the naming "main" vs "nested json" here? Does main refer to the original code and nested json refers to the change proposal? |
That's the response generated by the adk agent, could be because of the change or model temperature
Yes |
|
🧨 Preview deployments removed. |
… string into map to make response have nested json (#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
… string into map to make response have nested json (googleapis#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com> 446d62a
…into map to make response have nested json (#1894) ## Description Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string ## PR Checklist - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #1838 --------- Co-authored-by: Averi Kitsch <akitsch@google.com>
🤖 I have created a release *beep* *boop* --- ## [0.21.0](v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](#1894)) ([446d62a](446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](#1751)) ([5abad5d](5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](#1993)) ([0e269a1](0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](#1969)) ([2bff138](2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.21.0](v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](#1894)) ([446d62a](446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](#1751)) ([5abad5d](5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](#1993)) ([0e269a1](0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](#1969)) ([2bff138](2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](#1894)) ([446d62a](446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](#1751)) ([5abad5d](5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](#1993)) ([0e269a1](0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](#1969)) ([2bff138](2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([googleapis#1894](googleapis#1894)) ([446d62a](googleapis@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([googleapis#1751](googleapis#1751)) ([5abad5d](googleapis@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([googleapis#1993](googleapis#1993)) ([0e269a1](googleapis@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([googleapis#1969](googleapis#1969)) ([2bff138](googleapis@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([googleapis#1894](googleapis#1894)) ([446d62a](googleapis@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([googleapis#1751](googleapis#1751)) ([5abad5d](googleapis@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([googleapis#1993](googleapis#1993)) ([0e269a1](googleapis@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([googleapis#1969](googleapis#1969)) ([2bff138](googleapis@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([googleapis#1894](googleapis#1894)) ([446d62a](googleapis@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([googleapis#1751](googleapis#1751)) ([5abad5d](googleapis@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([googleapis#1993](googleapis#1993)) ([0e269a1](googleapis@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([googleapis#1969](googleapis#1969)) ([2bff138](googleapis@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](googleapis/mcp-toolbox#1894)) ([446d62a](googleapis/mcp-toolbox@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](googleapis/mcp-toolbox#1751)) ([5abad5d](googleapis/mcp-toolbox@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](googleapis/mcp-toolbox#1993)) ([0e269a1](googleapis/mcp-toolbox@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](googleapis/mcp-toolbox#1969)) ([2bff138](googleapis/mcp-toolbox@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
Description
Unmarshal object_details json string into map to make response have nested json in spannerlisttables instead of nested JSON string
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #1838