Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4fd76ef
feat(sources/healthcare): add a new healthcare source
Quarz0 Oct 8, 2025
f15be3e
Apply suggestions from code review#1
Quarz0 Oct 9, 2025
fc0a1de
feat(tools/healthcare): Add healthcare dataset tools
Quarz0 Oct 9, 2025
3b453a4
feat(tools/healthcare): Add healthcare fhir tools
Quarz0 Oct 18, 2025
520e0f3
feat(tools/healthcare): Add healthcare dataset tools (#1671)
Quarz0 Oct 20, 2025
e3ff2be
Revert "feat(tools/healthcare): Add healthcare dataset tools" (#1742)
Yuan325 Oct 20, 2025
a617079
feat(sources/healthcare): add a new healthcare source (#1656)
Quarz0 Oct 21, 2025
96ad4be
address comments about integration tests-1
Quarz0 Oct 22, 2025
053c340
Merge branch 'healthcare' of https://github.com/googleapis/genai-tool…
Quarz0 Oct 22, 2025
fc10b8d
Merge branch 'healthcare_dataset' into healthcare_fhir
Quarz0 Oct 22, 2025
200856e
feat(tools/healthcare): Add healthcare dataset tools (#1671)
Quarz0 Oct 20, 2025
ecd533e
Revert "feat(tools/healthcare): Add healthcare dataset tools" (#1742)
Yuan325 Oct 20, 2025
1a278bd
feat(sources/healthcare): add a new healthcare source (#1656)
Quarz0 Oct 21, 2025
96a706b
feat(tools/healthcare): add healthcare dicom tools
Quarz0 Oct 24, 2025
b2698d0
Merge branch 'healthcare' of https://github.com/googleapis/genai-tool…
Quarz0 Oct 24, 2025
f016bb9
Merge branch 'healthcare_dataset' into healthcare_fhir
Quarz0 Oct 24, 2025
04c3269
Merge branch 'healthcare_fhir' into healthcare_dicom
Quarz0 Oct 26, 2025
b12e33f
Merge branch 'healthcare' of https://github.com/googleapis/genai-tool…
Quarz0 Oct 28, 2025
f824b3a
feat(tools/healthcare): Add healthcare dataset tools (#1743)
Quarz0 Oct 28, 2025
436caf3
Merge branch 'healthcare' of https://github.com/googleapis/genai-tool…
Quarz0 Oct 28, 2025
175e326
Merge branch 'healthcare' into healthcare_fhir
Quarz0 Oct 28, 2025
1d79336
Merge branch 'healthcare_fhir' into healthcare_dicom
Quarz0 Oct 28, 2025
e7ae885
feat(tools/healthcare): Add healthcare fhir tools (#1745)
Quarz0 Oct 28, 2025
f5e0d8d
Merge branch 'healthcare' of https://github.com/googleapis/genai-tool…
Quarz0 Oct 28, 2025
535d03c
Merge branch 'healthcare' into healthcare_dicom
Quarz0 Oct 28, 2025
10ef147
fix lint errors
Quarz0 Oct 28, 2025
f619731
feat(healthcare): adding prebuilt tools for healthcare
Quarz0 Oct 29, 2025
ffc1da4
move parsing of dicom params to a common util function
Quarz0 Oct 29, 2025
e4bcc03
Merge branch 'healthcare_dicom' into healthcare_prebuilt
Quarz0 Oct 29, 2025
1be7908
move parsing of dicom params to a common util function
Quarz0 Oct 29, 2025
d899e82
Merge branch 'healthcare_dicom' into healthcare_prebuilt
Quarz0 Oct 29, 2025
8260bdc
feat(tools/healthcare): fix birthdate parameter in fhir patient search
Quarz0 Oct 29, 2025
dd06082
feat(tools/healthcare): Add healthcare dicom tools (#1807)
Quarz0 Oct 30, 2025
2c217bf
feat(tools/healthcare): fix birthdate parameter in fhir patient searc…
Quarz0 Oct 30, 2025
16e5dd6
Merge branch 'healthcare' of https://github.com/googleapis/genai-tool…
Quarz0 Oct 30, 2025
0d32ff1
Merge branch 'healthcare' into healthcare_prebuilt
Quarz0 Oct 30, 2025
2d9a7d2
Merge branch 'healthcare' into healthcare_prebuilt
Yuan325 Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,7 @@ func TestPrebuiltTools(t *testing.T) {
cloudsqlmysqlobsvconfig, _ := prebuiltconfigs.Get("cloud-sql-mysql-observability")
cloudsqlmssqlobsvconfig, _ := prebuiltconfigs.Get("cloud-sql-mssql-observability")
serverless_spark_config, _ := prebuiltconfigs.Get("serverless-spark")
healthcare_config, _ := prebuiltconfigs.Get("healthcare")

// Set environment variables
t.Setenv("API_KEY", "your_api_key")
Expand Down Expand Up @@ -1342,6 +1343,10 @@ func TestPrebuiltTools(t *testing.T) {
t.Setenv("NEO4J_USERNAME", "your_neo4j_user")
t.Setenv("NEO4J_PASSWORD", "your_neo4j_password")

t.Setenv("HEALTHCARE_PROJECT", "your_gcp_project_id")
t.Setenv("HEALTHCARE_REGION", "your_gcp_region")
t.Setenv("HEALTHCARE_DATASET", "your_healthcare_dataset")

ctx, err := testutils.ContextWithNewLogger()
if err != nil {
t.Fatalf("unexpected error: %s", err)
Expand Down Expand Up @@ -1611,6 +1616,24 @@ func TestPrebuiltTools(t *testing.T) {
},
},
},
{
name: "healthcare prebuilt tools",
in: healthcare_config,
wantToolset: server.ToolsetConfigs{
"healthcare_dataset_tools": tools.ToolsetConfig{
Name: "healthcare_dataset_tools",
ToolNames: []string{"get_dataset", "list_dicom_stores", "list_fhir_stores"},
},
"healthcare_fhir_tools": tools.ToolsetConfig{
Name: "healthcare_fhir_tools",
ToolNames: []string{"get_fhir_store", "get_fhir_store_metrics", "get_fhir_resource", "fhir_patient_search", "fhir_patient_everything", "fhir_fetch_page"},
},
"healthcare_dicom_tools": tools.ToolsetConfig{
Name: "healthcare_dicom_tools",
ToolNames: []string{"get_dicom_store", "get_dicom_store_metrics", "search_dicom_studies", "search_dicom_series", "search_dicom_instances", "retrieve_rendered_dicom_instance"},
},
},
},
}

for _, tc := range tcs {
Expand Down
30 changes: 30 additions & 0 deletions docs/en/reference/prebuilt-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,3 +574,33 @@ details on how to connect your AI tools (IDEs) to databases via Toolbox and MCP.
* **Tools:**
* `execute_cypher`: Executes a Cypher query.
* `get_schema`: Retrieves the schema of the Neo4j database.

## Google Cloud Healthcare API
* `--prebuilt` value: `healthcare`
* **Environment Variables:**
* `HEALTHCARE_PROJECT`: The GCP project ID.
* `HEALTHCARE_REGION`: The healthcare dataset region.
* `HEALTHCARE_DATASET`: The healthcare dataset ID.
* `HEALTHCARE_USE_CLIENT_OAUTH`: (Optional) If `true`, forwards the client's
OAuth access token for authentication. Defaults to `false`.
* **Permissions:**
* **Healthcare FHIR Resource Reader** (`roles/healthcare.fhirResourceReader`) to read an
search FHIR resources.
* **Healthcare DICOM Viewer** (`roles/healthcare.dicomViewer`) to retrieve DICOM images from a
DICOM store.
* **Tools:**
* `get_dataset`: Gets information about a healthcare dataset.
* `list_dicom_stores`: Lists DICOM stores in a healthcare dataset.
* `list_fhir_stores`: Lists FHIR stores in a healthcare dataset.
* `get_fhir_store`: Gets information about a FHIR store.
* `get_fhir_store_metrics`: Gets metrics for a FHIR store.
* `get_fhir_resource`: Gets a FHIR resource from a FHIR store.
* `fhir_patient_search`: Searches for patient resource(s) based on a set of criteria.
* `fhir_patient_everything`: Retrieves resources related to a given patient.
* `fhir_fetch_page`: Fetches a page of FHIR resources.
* `get_dicom_store`: Gets information about a DICOM store.
* `get_dicom_store_metrics`: Gets metrics for a DICOM store.
* `search_dicom_studies`: Searches for DICOM studies.
* `search_dicom_series`: Searches for DICOM series.
* `search_dicom_instances`: Searches for DICOM instances.
* `retrieve_rendered_dicom_instance`: Retrieves a rendered DICOM instance.
5 changes: 5 additions & 0 deletions internal/prebuiltconfigs/prebuiltconfigs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var expectedToolSources = []string{
"cloud-sql-postgres",
"dataplex",
"firestore",
"healthcare",
"looker-conversational-analytics",
"looker",
"mssql",
Expand Down Expand Up @@ -120,6 +121,7 @@ func TestGetPrebuiltTool(t *testing.T) {
spannerpg_config, _ := Get("spanner-postgres")
sqlite_config, _ := Get("sqlite")
neo4jconfig, _ := Get("neo4j")
healthcare_config, _ := Get("healthcare")
if len(alloydb_admin_config) <= 0 {
t.Fatalf("unexpected error: could not fetch alloydb prebuilt tools yaml")
}
Expand Down Expand Up @@ -198,6 +200,9 @@ func TestGetPrebuiltTool(t *testing.T) {
if len(neo4jconfig) <= 0 {
t.Fatalf("unexpected error: could not fetch neo4j prebuilt tools yaml")
}
if len(healthcare_config) <= 0 {
t.Fatalf("unexpected error: could not fetch healthcare prebuilt tools yaml")
}
}

func TestFailGetPrebuiltTool(t *testing.T) {
Expand Down
103 changes: 103 additions & 0 deletions internal/prebuiltconfigs/tools/healthcare.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

sources:
healthcare-source:
kind: healthcare
project: ${HEALTHCARE_PROJECT}
region: ${HEALTHCARE_REGION}
dataset: ${HEALTHCARE_DATASET}
useClientOAuth: ${HEALTHCARE_USE_CLIENT_OAUTH:false}

tools:
get_dataset:
kind: get-healthcare-dataset
description: Use this tool to get the details of a healthcare dataset
source: healthcare-source
list_dicom_stores:
kind: list-dicom-stores
description: Use this tool to list the DICOM stores in the healthcare dataset
source: healthcare-source
list_fhir_stores:
kind: list-fhir-stores
description: Use this tool to list the FHIR stores in the healthcare dataset
source: healthcare-source
get_fhir_store:
kind: get-fhir-store
description: Use this tool to get details about a FHIR store in the healthcare dataset
source: healthcare-source
get_fhir_store_metrics:
kind: get-fhir-store-metrics
description: Use this tool to get metrics about a FHIR store in the healthcare dataset
source: healthcare-source
get_fhir_resource:
kind: get-fhir-resource
description: Use this tool to get a FHIR resource from a FHIR store
source: healthcare-source
fhir_patient_search:
kind: fhir-patient-search
description: Use this tool to search for patient resource(s) in a FHIR store based on a set of criteria
source: healthcare-source
fhir_patient_everything:
kind: fhir-patient-everything
description: Use this tool to retrieve resources related to a given patient from a FHIR store
source: healthcare-source
fhir_fetch_page:
kind: fhir-fetch-page
description: Use this tool to fetche a page of FHIR resources from a FHIR store
source: healthcare-source
get_dicom_store:
kind: get-dicom-store
description: Use this tool to get details about a DICOM store in the healthcare dataset
source: healthcare-source
get_dicom_store_metrics:
kind: get-dicom-store-metrics
description: Use this tool to get metrics about a DICOM store in the healthcare dataset
source: healthcare-source
search_dicom_studies:
kind: search-dicom-studies
description: Use this tool to search for DICOM studies in a DICOM store
source: healthcare-source
search_dicom_series:
kind: search-dicom-series
description: Use this tool to search for DICOM series in a DICOM store
source: healthcare-source
search_dicom_instances:
kind: search-dicom-instances
description: Use this tool to search for DICOM instances in a DICOM store
source: healthcare-source
retrieve_rendered_dicom_instance:
kind: retrieve-rendered-dicom-instance
description: Use this tool to retrieve a base64 encoding of a rendered DICOM instance from a DICOM store in JPEG format
source: healthcare-source

toolsets:
healthcare_dataset_tools:
- get_dataset
- list_dicom_stores
- list_fhir_stores
healthcare_fhir_tools:
- get_fhir_store
- get_fhir_store_metrics
- get_fhir_resource
- fhir_patient_search
- fhir_patient_everything
- fhir_fetch_page
healthcare_dicom_tools:
- get_dicom_store
- get_dicom_store_metrics
- search_dicom_studies
- search_dicom_series
- search_dicom_instances
- retrieve_rendered_dicom_instance
2 changes: 2 additions & 0 deletions internal/sources/healthcare/healthcare.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func initHealthcareConnectionWithOAuthToken(ctx context.Context, tracer trace.Tr
if err != nil {
return nil, fmt.Errorf("failed to create Healthcare service: %w", err)
}
service.UserAgent = userAgent
return service, nil
}

Expand All @@ -179,6 +180,7 @@ func initHealthcareConnection(ctx context.Context, tracer trace.Tracer, name str
if err != nil {
return nil, nil, fmt.Errorf("failed to create Healthcare service: %w", err)
}
service.UserAgent = userAgent
return service, cred.TokenSource, nil
}

Expand Down
Loading