Repository navigation
Revamping of MCP Tools page - #2081
Merged
Merged
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
zyantw
marked this pull request as draft
August 6, 2026 22:10
zyantw
marked this pull request as ready for review
August 11, 2026 22:37
4 tasks done
zyantw
commented
Aug 11, 2026
zyantw
added a commit
that referenced
this pull request
Aug 11, 2026
This PR introduces the new **Advanced MCP Configuration Guide** (`docs/tools-custom/advanced-mcp-tools.md`), extracting advanced integration patterns, low-level lifecycle hooks, and production deployment architectures into a dedicated reference. This complements the core MCP guide ([#2081](#2081)) by keeping the quickstart focused while providing enterprise patterns for advanced developers. --- ## Key Improvements & Information Architecture ### 1. Developer Decision Matrix - Added a lookup table at the top that maps common engineering requirements (multi-tenant auth, destructive tool safety, progress bars, containerization) to specific ADK APIs. ### 2. Prioritization by Real-World Frequency The guide is structured progressively from high-demand configurations to specialized edge cases: 1. **Dynamic Authentication & Per-User Headers (`header_provider`)** — Multi-tenant token injection using `ReadonlyContext`. 2. **Human-in-the-Loop & Tool Confirmations (`require_confirmation`)** — Guardrails for destructive database/file operations. 3. **Real-Time Progress Tracking (`progress_callback`)** — Both global functions and context-aware session factories (`ProgressCallbackFactory`). 4. **Standalone Runner Execution (Outside `adk web`)** — Embedding agents into FastAPI/CLI backends with graceful `await toolset.close()` teardown. 5. **Enterprise Cloud Deployment Architectures** — Cloud Run stateless services (`StreamableHTTPConnectionParams`), GKE Pod Sidecars, and Vertex AI Agent Runtime. 6. **Tool Namespacing & Disambiguation (`tool_name_prefix`)** — Resolving naming collisions when combining multiple MCP servers. 7. **Bi-directional Protocol Hooks** — Handlers for server-initiated sampling (`sampling_callback`) and authentication challenges (`elicitation_callback`). 8. **Diagnostic Logging (`errlog`)** — Subprocess STDERR redirection for troubleshooting. --- ## Technical Verification Report against `google/adk-python` All code examples, class imports, and parameter signatures in this PR were verified against the latest `google/adk-python` codebase: | Feature / Snippet | Verification in `google/adk-python` | Verification Status | | :--- | :--- | :--- | | **`header_provider`** | [`mcp_toolset.py:L113-L119`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L113-L119) & [`L346-L352`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L346-L352) | Verified: Accepts `Callable[[ReadonlyContext], dict[str, str] \| Awaitable[dict[str, str]]]` and injects headers dynamically on each session call. | | **`require_confirmation`** | [`mcp_toolset.py:L112`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L112) & [`function_tool.py:L278-L340`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/function_tool.py#L278-L340) | Verified: Supports both boolean flags and callable predicates receiving tool arguments. | | **`progress_callback` & Factory** | [`mcp_toolset.py:L120`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L120) & [`mcp_tool.py:L496-L515`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_tool.py#L496-L515) | Verified: Supports standard `ProgressFnT` as well as `ProgressCallbackFactory` for modifying `ToolContext.state`. | | **`Runner` Lifecycle Teardown** | [`mcp_toolset.py:L487-L499`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L487-L499) | Verified: `await toolset.close()` safely terminates the underlying `MCPSessionManager` and closes open subprocesses/streams. | | **`StreamableHTTPConnectionParams`** | [`mcp_session_manager.py:L312-L339`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_session_manager.py#L312-L339) | Verified: Matches Pydantic model definition with `url`, `headers`, `timeout`, and `sse_read_timeout`. | | **`tool_name_prefix`** | [`mcp_toolset.py:L108`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L108) | Verified: Passed through to `BaseToolset` to prefix all tool declarations and prevent namespace collisions. | | **`sampling_callback` & `elicitation_callback`** | [`mcp_toolset.py:L122-L125`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/tools/mcp_tool/mcp_toolset.py#L122-L125) | Verified: Forwarded to `MCPSessionManager` for bi-directional protocol handling. | | **CLI Deployment Commands** | [`cli_tools_click.py:L2229-L2770`](file:///usr/local/google/home/zyanya/.gemini/jetski/scratch/adk_review/adk-python/src/google/adk/cli/cli_tools_click.py#L2229-L2770) | Verified: Commands use active flags and omit deprecated arguments (such as `--staging_bucket`). | --- ## Verification Checklist - [x] Code snippets follow canonical `from google.adk.agents import LlmAgent` imports. - [x] Code blocks include multi-language tabs (Python, TypeScript, Java) where applicable. - [x] All parameters match current Pydantic models in `google-adk` v2.x. - [x] Tested markdown rendering, tables, and code block formatting.
This was referenced Aug 20, 2026
zyantw
marked this pull request as draft
August 26, 2026 22:19
zyantw
marked this pull request as ready for review
August 27, 2026 21:39
zyantw
marked this pull request as draft
September 1, 2026 19:35
sesaymohsesay11-design
approved these changes
Sep 4, 2026
sesaymohsesay11-design
approved these changes
Sep 4, 2026
sesaymohsesay11-design
approved these changes
Sep 4, 2026
zyantw
marked this pull request as ready for review
September 4, 2026 22:00
joefernandez
reviewed
Sep 9, 2026
joefernandez
reviewed
Sep 9, 2026
joefernandez
reviewed
Sep 9, 2026
Three example files were missing the required Google license header, which fails the License Header Lint CI check. Prepend the standard header.
* fix: remove broken relative import in rag_engine example The snippet imported from a non-existent .prompts module and used an undefined return_instructions_root(). Replaced with a self-contained instruction string so the knowledge-engine example runs standalone. * Apply suggestion from @joefernandez --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
create_session is async; calling it without await at module scope produces an un-awaited coroutine. Wrap with asyncio.run, matching the pattern used in other built-in tool examples.
…2211) * docs(integrations): document Go support for the Postman MCP server The Postman page carried Python and TypeScript tabs only, so Go users had no documented way to reach the Postman MCP server even though adk-go needs no new code for it. Both transports the page describes are already covered by google.golang.org/adk/v2/tool/mcptoolset: mcp.CommandTransport for the local npx server, and Config.Endpoint plus Config.Auth for the remote streamable HTTP server, where auth.StaticToken produces the same Authorization: Bearer header the Python and TypeScript samples set by hand. Add the lst-go language-support span and a Go tab with the same Local and Remote sub-tabs as the other two languages, following the pattern used by agent-registry.md and mcp-toolbox-for-databases.md. The optional server flags are held in an args slice so the Configuration section's "add --full or --code to the args list" reads correctly for Go as well. * docs(integrations): scope the env passed to the Postman MCP server The Go sample forwarded the whole parent environment to a package fetched from npm at run time, including the GOOGLE_API_KEY it reads a few lines earlier. Pass an allowlist instead: the Postman key plus the variables npx needs on POSIX and Windows. --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
…card (#2221) Replace the CopilotKit catalog icon with the kite mark on a transparent background so it matches the other integration cards instead of showing a dark square.
…oard setup page (#2227) * docs(bqaa): align plugin docs with Python 2.9 / Java 1.9 and add the dashboard setup page Aligns the BigQuery Agent Analytics integration page with the released ADK Python 2.9.0 and Java 1.9.0 implementations, preserving the Kotlin integration material now on main: - Java v1.8.0+ require `datasetId` and default `tableName` to `agent_events`; v1.7.0 and earlier used `agent_analytics` and `events`. - Distinguish language-specific contracts: Python-only error/workflow events and `event_id`, Java view-column differences, Java opt-in view creation, and Python-only fork handling. - Default Python delivery remains best-effort. `event_id` is the consumer deduplication key; `exactly_once_delivery` prevents ambiguous-retry duplicates within a live processor rather than guaranteeing lossless delivery. - Drop counters distinguish lost rows from formatter/parser incidents that still write sentinel content. Also adds a "Looker Studio template" subsection at the head of "Build a dashboard" pointing at the hosted setup page (https://googlecloudplatform.github.io/BigQuery-Agent-Analytics-SDK/), which turns a fully qualified event table ID into a private copy of the published Looker Studio template, plus the Owner's/Viewer's credentials guidance needed before sharing that copy. * docs(bqaa): restore concrete OAuth credential-exposure warning Address the L0 risk review on #2227. - Restore the specific AuthenticatedFunctionTool OAuth2 exposure scenario and the reference to google/adk-python#3845, which is still open. State the actual gap: redaction matches key names exactly after lowercasing and hyphen normalization, so the camelCase aliases ADK emits for adk_request_credential arguments (clientSecret, accessToken) are not matched. - Add a correction notice for the previously documented secret: redaction guarantee, pointing readers to audit existing agent_events tables. - Attribute the dashboard setup page's no-backend property to that page rather than asserting it, since it is not versioned by this repo. - Tell readers to keep the Looker Studio report private until the switch to Viewer's credentials is verified. - Drop the hard-coded template chart and page counts, which drift silently. * docs(bqaa): address review feedback on the dashboard section Three durability fixes from review: - Drop the "fastest path to a dashboard" superlative. It was an implicit comparison against the Looker Block and the notebook documented directly below, and nothing in this repo can verify it stays true. - Say "prebuilt report pages" instead of hard-coding chart and page counts for a template hosted in BigQuery-Agent-Analytics-SDK. The counts would drift silently with no signal here. - Point Additional resources at the org-owned SDK examples directory rather than a notebook under a personal GitHub account, which could be renamed, made private, or deleted without notice.
* docs: document the experimental adk.experimental.* metrics Adds an Experimental metrics section under the metrics schema covering the fourteen adk.experimental.* histograms: per-invocation and per-workflow token spend, plus the per-workflow inference and tool call counts. These roll token spend up from the per-model-call grain of gen_ai.client.* to a whole agent invocation or workflow, so a reader can cost one turn without summing model calls. They are off by default; the section states the opt-in (ADK_EXPERIMENTAL_TELEMETRY, or RunConfig.telemetry per request), that the names and meaning may change, and that nested workflow datapoints are folded into their parent so a naive sum double counts. The experimental opt-in alone is not enough for the eight invoke_workflow rows. They are recorded only under telemetry schema v2, which defaults on for Agent Engine and off everywhere else, so a reader who exports only ADK_EXPERIMENTAL_TELEMETRY locally would find those rows empty with nothing on the page to explain it. The section now states the extra ADK_TELEMETRY_SCHEMA_VERSION_OPT_IN=2 requirement, scoped so it does not overstate: invoke_agent rows are unaffected, and a Workflow-engine app records per-node datapoints under either version. * Update docs/observability/metrics.md --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
* docs(live): add LiveKit runner integration guide * docs(integrations): fix LiveKit worker entry point and Cloud Run guidance The worker snippet omitted cli.run_app(server), so the Dockerfile CMD below it imported the module and exited without parsing 'start'. The request timeout does not bound call duration: jobs arrive over the worker's own outbound connection, and its only inbound surface is a health endpoint that returns immediately. Replace that advice with the settings that do matter, and note that the health server uses a fixed port rather than $PORT. * docs(integrations): reword Cloud Run deployment guidance Move the port expression out of the paragraph into a snippet, matching the prose-then-code rhythm used elsewhere on the page, and frame the section around the setting to apply rather than the probe failure it avoids. * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/live/custom-server.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/livekit.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Apply suggestion from @joefernandez --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
The page documented the legacy IAM Connectors (v1) API, which Google Cloud
documents as not going GA and directs users to migrate away from.
Following it as written sends requests to the wrong service: ADK dispatches on
the resource-name shape, routing `connectors/{id}` to
iamconnectorcredentials.googleapis.com and everything else to
agentidentitycredentials.googleapis.com, so finalizing against the wrong one
returns a 404.
- Auth scheme resource name uses `authProviders/` instead of `connectors/`,
with a note for anyone still on v1.
- Finalize endpoint is agentidentitycredentials.googleapis.com/v1.
- Required role is `agentidentity.user` instead of `iamconnectors.user`.
- Prerequisite and Resources links point at the -v2 pages.
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
…list (#2242) The workflow list links to #brainstorm-the-migration-plan, but the heading is "Brainstorm a migration plan", so mkdocs reports a missing anchor and the link does not jump. Point the item at #brainstorm-a-migration-plan and match the link text to the heading, as the other list items do.
* docs: fix MCP dependency for docs server setup * Apply suggestion from @joefernandez * Update coding-with-ai.md --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
* 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. * Update spanner.md Resolves comments and feedback. * Update spanner.md --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
agent_engine is not a valid option. It has to be either `agent_runtime`, `cloud_run`, `gke`, or `none`. Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
#2249) * docs: fix the third Loop Agent label in the template workflows diagram The Loop Agent column of template_workflows.svg labeled its third box "Agent B", repeating the second box, while the Sequence and Parallel columns show Agent A, Agent B and Agent C. Replace that label with the "Agent C" outline from the Parallel column, moved into the Loop box. * Apply batched suggestions from code review Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
* adding plugin info and rewriting for clarity * fixed deprecated process * organization quick fixes * Update docs/observability/logging.md Adding nuance to comment Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Warning note for snippet Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * updated snippet * added comment about traces-only for Kotlin * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * fixed Go snippet * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * final writing structure changes * final changes * fixed link * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/observability/logging.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * joes last comment about this update --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
…2223) * docs(live): add live agent guardrails guide and Model Armor plugin * docs(live): fix before_tool_callback signature in guardrails example The example used (callback_context, tool_name, tool_args), which matches neither the agent-level nor the plugin-level tool callback signature, so it would fail at call time. Use the agent-level form documented by _SingleBeforeToolCallback: (tool, args, tool_context). * Update docs/live/guardrails.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/model-armor.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/integrations/model-armor.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/live/guardrails.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/live/guardrails.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/live/guardrails.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/callbacks/types-of-callbacks.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/live/guardrails.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * Update docs/live/guardrails.md Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com> * docs(live): address code and style feedback --------- Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
The adk-samples repo restructured its layout and the Deep Search sample moved from python/agents/deep-search to core/python/deep-search, leaving the link in the grounding overview returning a 404. This is one of the broken links currently failing the link-checker workflow on main. NOTE: I manually checked and verified all links rendered on the staged index page. https://deploy-preview-2225--adk-docs-preview.netlify.app/grounding/index Co-authored-by: Kevin <52006738+KevinACheek@users.noreply.github.com>
The Agent C outline for the Loop Agent column is a copy of the Parallel column's label and relied on a separate transform to sit in the Loop box. That line was removed before #2249 merged, so the Loop box renders empty. Shift the path's starting point instead, so the position no longer depends on an extra attribute. The rest of the path is relative, so only the first coordinate changes. Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
Co-authored-by: Joe Fernandez <931947+joefernandez@users.noreply.github.com>
…P servers (#2254) Both pages carried Python and TypeScript tabs only, so Go readers had no documented path to either server. Nothing is missing in adk-go: both are plain stdio MCP servers reached through tool/mcptoolset. The samples hand the child process an allowlist of environment variables rather than the parent environment, following the Postman page, so the agent's own GOOGLE_API_KEY is not forwarded to a package fetched from npm.
zyantw
force-pushed
the
zyantw-patch-7
branch
from
September 24, 2026 17:59
0c19d26 to
004ec1f
Compare
This was referenced Sep 24, 2026
Merged
zyantw
added a commit
that referenced
this pull request
Sep 24, 2026
* MCP revamping fix Follow-up PR of #2081 to correct some mistakes in navigation and internal links * Delete docs/mcp directory * Update agent-as-server.md Adding Google Cloud Genmedia info from duplicated mcp section * Update index.md updated broken internal links * Update advanced.md updated broken links * Update mkdocs.yml * Update index.md * Update mkdocs.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staged: https://deploy-preview-2081--adk-docs-preview.netlify.app/tools-custom/mcp-tools/
PR Summary & Consolidation Mapping
This PR refactors and expands the Model Context Protocol (MCP) documentation in ADK. Previously, all MCP documentation was consolidated into a single monolithic 1,300-line page (
docs/tools-custom/mcp-tools.md), mixing introductory tutorials, multi-language snippets, deployment guides, and advanced runtime configurations.This PR modularizes the content into a streamlined 5-page documentation suite organized by developer use case, adds comprehensive multi-language support (Python, TypeScript, Go, Java, and Kotlin), and incorporates technical patterns validated against all five language SDK repositories.
Comparison: Original Page (
main) vs. PR Changes (HEAD)main: mcp-tools.md)HEAD: 5 Modular Pages)mcp-tools.md)mcp-tools-advanced.md): Dedicated guide for dynamic per-userheader_provider,require_confirmationhuman-in-the-loop approvals, session-aware progress factories, standaloneRunnerlifecycle teardown,tool_name_prefixnamespacing, bi-directional sampling/elicitation, and interactive UI widget rendering.agent-as-mcp-server.md): Complete guide covering one-line agent publishing viato_mcp_server(agent), low-level tool conversion viaadk_to_mcp_tool_type, stdio server lifecycle, and client testing.agent-managed-mcp.md): Architectural guide on encapsulating MCP toolsets inside sub-agents usingAgentTool, applying cognitivetool_filter, eliminating parent context window bloat, and enabling model tiering.mcp-deployment.md): Dedicated deployment reference emphasizing synchronous agent definition rules, Cloud Run Streamable HTTP ASGI microservices, GKE sidecars, and Agent Runtime commands.Key Technical Claims & Repository Verification
1. Go SDK Transport & Tool Filtering
docs/tools-custom/mcp-tools.mdgithub.com/modelcontextprotocol/go-sdk/mcpwithmcptoolset.Newacceptingmcp.CommandTransportandtool.AllowedToolsPredicate.google/adk-go/go.mod:18google/adk-go/tool/mcptoolset/set.go:44-582. TypeScript Remote Connection Headers Configuration
docs/tools-custom/mcp-tools.md@google/adk), custom headers for remoteStreamableHTTPConnectionParamsmust be passed viatransportOptions.requestInit.headers.google/adk-js/core/src/tools/mcp/mcp_session_manager.ts:53-663. Sub-Agent Wrapping & Description Delegation (
AgentTool)docs/tools-custom/agent-managed-mcp.mdAgentToolwraps anLlmAgentas a callable tool, automatically deriving itsnameanddescriptionfrom the child agent without accepting a directdescriptionkeyword argument.google/adk-python/src/google/adk/tools/agent_tool.py:137-1524. Human-In-The-Loop Confirmation Argument Introspection
docs/tools-custom/mcp-tools-advanced.mdrequire_confirmationcallable parameters against incoming tool arguments, requiring parameter names (such asquery) or**kwargs.google/adk-python/src/google/adk/tools/mcp_tool/mcp_tool.py:427-4405. One-Line Agent Conversion to MCP Server (
to_mcp_server)docs/tools-custom/agent-as-mcp-server.mdto_mcp_server(agent)to publish an entireLlmAgentas a standard FastMCP server over stdio.google/adk-python/src/google/adk/tools/mcp_tool/_agent_to_mcp.py:34-456. Java Streamable HTTP Remote Parameters
docs/tools-custom/mcp-deployment.mdStreamableHttpServerParameters.builder().url(...).headers(...).build()to configure remote Streamable HTTP MCP connections.google/adk-java/core/src/main/java/com/google/adk/tools/mcp/StreamableHttpServerParameters.java:33-407. Kotlin Config-Driven Toolset & Header Provider
docs/tools-custom/mcp-deployment.mdMcpToolsetviaMcpToolset.McpToolsetConfig(streamableHttpConnectionParams = ...).toToolset(headerProvider = ...).google/adk-kotlin/core/src/jvmMain/kotlin/com/google/adk/kt/tools/mcp/McpToolset.kt:406-425@JvmOverloads fun toToolset( headerProvider: (suspend (ReadonlyContext) -> Map<String, String>)? = null, progressConsumers: List<(McpSchema.ProgressNotification) -> Unit> = emptyList(), ): McpToolset { val params = listOfNotNull(stdioConnectionParams, sseConnectionParams, streamableHttpConnectionParams) require(params.size == 1) { "Exactly one of stdioConnectionParams, sseConnectionParams or streamableHttpConnectionParams must be set" }Conclusion
All critical claims and code implementations across the 5 files in PR #2081 directly match the API definitions and conventions of their respective language repositories. The documentation PR is PASS.