Skip to content

Add in Go snippets for MCP tools - #901

Closed
ToniCorinne wants to merge 5 commits into
mainfrom
tk-mcp-tools
Closed

ToniCorinne wants to merge 5 commits into
mainfrom
tk-mcp-tools

Conversation

@ToniCorinne

Copy link
Copy Markdown
Member

Updates:

  • Added two Go snippets
  • Updated Python/Java formatting to make page slightly easier to read.

Note: @joefernandez this page likely needs a much larger refactoring, if we want to migrate towards the tab structure we have on other pages. PTAL at how I modified the existing Python/Java and see if you'd prefer that updated differently.

@koverholt koverholt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the Go samples and reformatting existing Python / Java samples.

Agree that this page needs refactoring to show permutations of MCP config rather than the longer serial explanations w/ tutorial steps that are there now. So thanks for getting the samples in place even in this existing format.

Future

Future versions of this page and our third-party tools page (example) should show more densely nested code tabs in a much more concise way without having to scroll, such as:

  • Python
    • Local MCP (stdio)
    • Remote MCP (http)
    • Remote MCP (sse)
  • Java
    • Local MCP (stdio)
    • Remote MCP (http)
    • Remote MCP (sse)
  • Go
    • Local MCP (stdio)
    • Remote MCP (http)
    • Remote MCP (sse)

while splitting the rest of the content on this page into separate pages under Custom Tools > MCP > .... That way users can quickly get to the sample code they need for a given MCP scenario via the nested tabs, or optionally dive deeper into more detailed topics around MCP on other pages.

Now

Approving this as a solid intermediate step to get the Go samples up! 😁 And would love to have an additional review by @joefernandez.

Comment thread docs/tools/mcp-tools.md Outdated

* **Set up ADK:** Follow the standard ADK [setup instructions](../get-started/quickstart.md/#venv-install) in the quickstart.
* **Install/update Python/Java:** MCP requires Python version of 3.9 or higher for Python or Java 17 or higher.
* **Install/update Python/Java/Go:** MCP requires Python version of 3.9 or higher for Python, Java 17 or higher, or Go 1.22 or higher.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order: Move Go between Py and Java.

Comment thread docs/tools/mcp-tools.md
For Go, you can create an `LlmAgent` with an `MCPToolset` to connect to the file system server. This example shows a self-contained application that initializes the agent and runs it with a sample prompt.

=== "Go"
```go

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move to a go file so we can verify compilation and functionality?

@joefernandez

Copy link
Copy Markdown
Collaborator

Approved. Feel free to merge this and handle the comments in a follow-on change.

Comment thread docs/tools/mcp-tools.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HEADS-UP: this file is MOVING:
docs/tools/mcp-tools.md to--> docs/tools-custom/mcp-tools.md

@joefernandez

Copy link
Copy Markdown
Collaborator

This change is way out of date. Closing.

@ToniCorinne - Feel free to resurrect this change if you are willing to tackle the merge issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants