docs(tools): correct tool APIs, auth config, and MCP lifecycle - #2025
Open
GWeale wants to merge 3 commits into
Open
docs(tools): correct tool APIs, auth config, and MCP lifecycle#2025GWeale wants to merge 3 commits into
GWeale wants to merge 3 commits into
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
# Conflicts: # docs/tools-custom/function-tools.md # docs/tools-custom/mcp-tools.md # docs/tools-custom/openapi-tools.md
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.
Corrects drifted API references across the tools pages: imports and attributes that do not exist in v2.5.0, a removed connection-lifecycle pattern, and examples the framework rejects at construction.
Changes
docs/tools-custom/authentication.md— the Google API example importedcalendar_tool_set, which does not exist (nowCalendarToolset, plusGoogleApiToolSet→GoogleApiToolset); the external-access-token example passedgoogle_credentials_configtoAuthCredential, nowBigQueryCredentialsConfig(external_access_token_key=...). Alsotool_context.staterather thantool_context.invocation_context.session.state,get_auth_response(auth_config)takes an argument, correctedservice_account_credential/scopesrequiredness,true→True, and addsBaseCredentialServiceandAuthenticatedFunctionTool.docs/tools-custom/index.md— documentedToolContext.function_call_event_idandauth_responseattributes that do not exist; replaced withinvocation_id,agent_name, andget_auth_response(auth_config). Notes the artifact/memory methods areasync, and documents thetool_filter/tool_name_prefixoptions on theBaseToolsetconstructor.docs/tools-custom/mcp-tools.md— theexit_stackcleanup pattern is gone; replaced withawait toolset.close()/await runner.close(). FixesMCPToolset→McpToolset,getstate/setstate→__getstate__/__setstate__, the MCP package name (mcp), the minimum Python (3.10), removes a--staging_bucketflag from the deploy command, and addsStreamableHTTPConnectionParams, thetool_filterpredicate form, and the experimentalto_mcp_server.docs/tools-custom/function-tools.md— claimedOptional[T]/| Nonealone makes a parameter optional (it does not; only a default does) and thatLongRunningFunctionToolstreams generator yields (it calls the function once and does not consume yields). Adds Pydantic-model parameters,AgentTool.include_plugins, and a note that Python prefers asingle_turnsub-agent overAgentTool.docs/tools/limitations.md— the examples pairingBuiltInCodeExecutor/url_contextwithgemini-flash-latestraise aValueErrorat construction; pinned togemini-2.5-flashwith a note explaining the gate. Also documentspropagate_grounding_metadataonAgentTooland thatbypass_multi_tools_limitmust be set on a tool instance you construct yourself.docs/tools-custom/openapi-tools.md,docs/tools-custom/confirmation.md—RestApiToolexecutes asynchronously viahttpx, notrequests; and a corrected path to the moved confirmation sample.The
gemini-2.5-flashpins inlimitations.mdare a deliberate exception to this repo's preference for-latestaliases: those two features reject the alias, so the examples cannot run as written otherwise.How this was produced
Part of a page-by-page audit of the Python docs against the
google/adk-pythonv2.5.0 source: every import resolved against a real 2.5.0 install, every constructor kwarg checked againstmodel_fields/inspect.signature, every documented default read off the field. A second independent pass re-derived each claim from source rather than trusting the finding, and a third conformed the new wording to the surrounding pages.mkdocs build --strictis clean.Only Python tabs and language-neutral prose were touched — this audit had no ground truth for the Go / Java / TypeScript SDKs.
Split out of a larger audit branch so each area can be reviewed on its own.