Skip to content

Commit d4ff6be

Browse files
docs(Go SDK): Update documentation for the refactored Go SDK (#2479)
## Description This PR updates the documentation after the refactor of the Go SDK into a multi-module structure ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] 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) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 41afeaf commit d4ff6be

File tree

12 files changed

+433
-380
lines changed

12 files changed

+433
-380
lines changed

docs/en/getting-started/introduction/_index.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,12 @@ README.](https://github.com/googleapis/mcp-toolbox-sdk-js/tree/main/packages/too
453453

454454
#### Go
455455

456-
Once you've installed the [Toolbox Go
457-
SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/core), you can load
458-
tools:
459-
460456
{{< tabpane text=true persist=header >}}
461457
{{% tab header="Core" lang="en" %}}
462458

459+
Once you've installed the [Go Core SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/core), you can load
460+
tools:
461+
463462
{{< highlight go >}}
464463
package main
465464

@@ -491,6 +490,9 @@ func main() {
491490
{{% /tab %}}
492491
{{% tab header="LangChain Go" lang="en" %}}
493492

493+
Once you've installed the [Go Core SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/core), you can load
494+
tools:
495+
494496
{{< highlight go >}}
495497
package main
496498

@@ -540,12 +542,15 @@ func main() {
540542
}
541543
}
542544
{{< /highlight >}}
543-
For end-to-end samples on using the Toolbox Go SDK with LangChain Go, see the [project's
544-
samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/core/samples)
545+
546+
For end-to-end samples on using the Toolbox Go SDK with LangChain Go, see the [module's samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/core/samples)
545547

546548
{{% /tab %}}
547549
{{% tab header="Genkit Go" lang="en" %}}
548550

551+
Once you've installed the [Go TBGenkit SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/tbgenkit), you can load
552+
tools:
553+
549554
{{< highlight go >}}
550555
package main
551556
import (
@@ -586,12 +591,14 @@ func main() {
586591
}
587592
}
588593
{{< /highlight >}}
589-
For end-to-end samples on using the Toolbox Go SDK with Genkit Go, see the [project's
590-
samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/tbgenkit/samples)
594+
For end-to-end samples on using the Toolbox Go SDK with Genkit Go, see the [module's samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/tbgenkit/samples)
591595

592596
{{% /tab %}}
593597
{{% tab header="Go GenAI" lang="en" %}}
594598

599+
Once you've installed the [Go Core SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/core), you can load
600+
tools:
601+
595602
{{< highlight go >}}
596603
package main
597604

@@ -642,13 +649,15 @@ func main() {
642649
}
643650
}
644651
{{< /highlight >}}
645-
For end-to-end samples on using the Toolbox Go SDK with Go GenAI, see the [project's
646-
samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/core/samples)
652+
For end-to-end samples on using the Toolbox Go SDK with Go GenAI, see the [module's samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/core/samples)
647653

648654
{{% /tab %}}
649655

650656
{{% tab header="OpenAI Go" lang="en" %}}
651657

658+
Once you've installed the [Go Core SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/core), you can load
659+
tools:
660+
652661
{{< highlight go >}}
653662
package main
654663

@@ -697,13 +706,15 @@ func main() {
697706
}
698707
}
699708
{{< /highlight >}}
700-
For end-to-end samples on using the Toolbox Go SDK with OpenAI Go, see the [project's
701-
samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/core/samples)
709+
For end-to-end samples on using the Toolbox Go SDK with OpenAI Go, see the [module's samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/core/samples)
702710

703711
{{% /tab %}}
704712

705713
{{% tab header="ADK Go" lang="en" %}}
706714

715+
Once you've installed the [Go TBADK SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go/tbadk), you can load
716+
tools:
717+
707718
{{< highlight go >}}
708719
package main
709720

@@ -732,8 +743,7 @@ func main() {
732743

733744
{{< /highlight >}}
734745

735-
For end-to-end samples on using the Toolbox Go SDK with ADK Go, see the [project's
736-
samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/tbadk/samples)
746+
For end-to-end samples on using the Toolbox Go SDK with ADK Go, see the [module's samples](https://github.com/googleapis/mcp-toolbox-sdk-go/tree/main/tbadk/samples)
737747

738748
{{% /tab %}}
739749
{{< /tabpane >}}

docs/en/getting-started/local_quickstart_go.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,39 @@ from Toolbox.
3939
go mod init main
4040
```
4141

42-
1. In a new terminal, install the
43-
[SDK](https://pkg.go.dev/github.com/googleapis/mcp-toolbox-sdk-go).
44-
45-
```bash
46-
go get github.com/googleapis/mcp-toolbox-sdk-go
47-
```
48-
49-
1. Create a new file named `hotelagent.go` and copy the following code to create
42+
1. In a new terminal, install the Go SDK Module:
43+
{{< notice warning >}}
44+
Breaking Change Notice: As of version `0.6.0`, this SDK has transitioned to a multi-module structure.
45+
* For new versions (`v0.6.0`+): You must import specific modules (e.g., `go get github.com/googleapis/mcp-toolbox-sdk-go/core`).
46+
* For older versions (`v0.5.1` and below): The SDK remains a single-module library (`go get github.com/googleapis/mcp-toolbox-sdk-go`).
47+
* Please update your imports and `go.mod` accordingly when upgrading.
48+
{{< /notice >}}
49+
50+
{{< tabpane persist=header >}}
51+
{{< tab header="LangChain Go" lang="bash" >}}
52+
go get github.com/googleapis/mcp-toolbox-sdk-go/core
53+
{{< /tab >}}
54+
55+
{{< tab header="Genkit Go" lang="bash" >}}
56+
go get github.com/googleapis/mcp-toolbox-sdk-go/core
57+
go get github.com/googleapis/mcp-toolbox-sdk-go/tbgenkit
58+
{{< /tab >}}
59+
60+
{{< tab header="Go GenAI" lang="bash" >}}
61+
go get github.com/googleapis/mcp-toolbox-sdk-go/core
62+
{{< /tab >}}
63+
64+
{{< tab header="OpenAI Go" lang="bash" >}}
65+
go get github.com/googleapis/mcp-toolbox-sdk-go/core
66+
{{< /tab >}}
67+
68+
{{< tab header="ADK Go" lang="bash" >}}
69+
go get github.com/googleapis/mcp-toolbox-sdk-go/core
70+
go get github.com/googleapis/mcp-toolbox-sdk-go/tbadk
71+
{{< /tab >}}
72+
{{< /tabpane >}}
73+
74+
2. Create a new file named `hotelagent.go` and copy the following code to create
5075
an agent:
5176

5277
{{< tabpane persist=header >}}

docs/en/getting-started/quickstart/go/adkgo/go.mod

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,43 @@ module adkgo-quickstart
33
go 1.24.4
44

55
require (
6-
github.com/googleapis/mcp-toolbox-sdk-go v0.4.0
7-
google.golang.org/adk v0.1.0
8-
google.golang.org/genai v1.36.0
6+
github.com/googleapis/mcp-toolbox-sdk-go/tbadk v0.6.0
7+
google.golang.org/adk v0.3.0
8+
google.golang.org/genai v1.45.0
99
)
1010

1111
require (
1212
cloud.google.com/go v0.123.0 // indirect
13-
cloud.google.com/go/auth v0.17.0 // indirect
13+
cloud.google.com/go/auth v0.18.1 // indirect
1414
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
1515
cloud.google.com/go/compute/metadata v0.9.0 // indirect
16+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1617
github.com/felixge/httpsnoop v1.0.4 // indirect
1718
github.com/go-logr/logr v1.4.3 // indirect
1819
github.com/go-logr/stdr v1.2.2 // indirect
1920
github.com/google/go-cmp v0.7.0 // indirect
2021
github.com/google/s2a-go v0.1.9 // indirect
22+
github.com/google/safehtml v0.1.0 // indirect
2123
github.com/google/uuid v1.6.0 // indirect
22-
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
23-
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
24+
github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect
25+
github.com/googleapis/gax-go/v2 v2.16.0 // indirect
26+
github.com/googleapis/mcp-toolbox-sdk-go/core v0.6.2 // indirect
2427
github.com/gorilla/websocket v1.5.3 // indirect
2528
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
2629
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
27-
go.opentelemetry.io/otel v1.38.0 // indirect
28-
go.opentelemetry.io/otel/metric v1.38.0 // indirect
29-
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
30-
go.opentelemetry.io/otel/trace v1.38.0 // indirect
31-
golang.org/x/crypto v0.45.0 // indirect
32-
golang.org/x/net v0.47.0 // indirect
33-
golang.org/x/oauth2 v0.32.0 // indirect
34-
golang.org/x/sys v0.38.0 // indirect
35-
golang.org/x/text v0.31.0 // indirect
36-
google.golang.org/api v0.255.0 // indirect
37-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect
38-
google.golang.org/grpc v1.76.0 // indirect
39-
google.golang.org/protobuf v1.36.10 // indirect
30+
go.opentelemetry.io/otel v1.39.0 // indirect
31+
go.opentelemetry.io/otel/metric v1.39.0 // indirect
32+
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
33+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
34+
golang.org/x/crypto v0.47.0 // indirect
35+
golang.org/x/net v0.49.0 // indirect
36+
golang.org/x/oauth2 v0.34.0 // indirect
37+
golang.org/x/sys v0.40.0 // indirect
38+
golang.org/x/text v0.33.0 // indirect
39+
google.golang.org/api v0.265.0 // indirect
40+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect
41+
google.golang.org/grpc v1.78.0 // indirect
42+
google.golang.org/protobuf v1.36.11 // indirect
4043
rsc.io/omap v1.2.0 // indirect
4144
rsc.io/ordered v1.1.1 // indirect
4245
)

0 commit comments

Comments
 (0)