docs: document all toolset config options for api, fetch, openapi#2895
Merged
Conversation
- Add timeout and allow_private_ips to api and openapi toolsets
- Restructure api properties into toolset-level and api_config tables
- Document placeholder support: ${env.VAR} and ${headers.NAME}
- Document custom headers support in fetch
- Fix outdated callout claiming fetch has no custom headers
- Add examples for reaching internal services with SSRF warnings
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Reviewed docs/tools/api/index.md, docs/tools/fetch/index.md, and docs/tools/openapi/index.md.
Verified against source of truth:
pkg/tools/builtin/api/api.go— confirmstimeout/allow_private_ipsfields, JS expander for${param}(Goja, full ECMAScript), andupstream.ResolveHeadersfor${headers.NAME}supportpkg/tools/builtin/fetch/fetch.go— confirms custom headers applied last (overrideAccept/User-Agent), env-only expansion at startup, and per-redirect header strippingpkg/tools/builtin/openapi/openapi.go— confirmstimeoutapplies to both spec fetch and generated tool calls, and${headers.NAME}is resolved at request timepkg/upstream/headers.go— confirms${headers.NAME}placeholder semanticsagent-schema.json— confirmsapi_configrequired fortype: api,timeout/allow_private_ipsas toolset-level fields- Go 1.26.3 stdlib — confirms
Www-Authenticateis treated as a sensitive header stripped on cross-domain redirects (consistent with the fetch callout's claim) - Goja runtime —
encodeURIComponentis a standard ECMAScript built-in and works correctly in Goja (confirmed by running the function)
All documented behavior matches the implementation. No issues found in the changed code.
melmennaoui
approved these changes
May 26, 2026
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.
These docs fill gaps in the coverage of
fetch,api, andopenapitoolset configuration. The updates close missing documentation for recently added config fields and correct a couple of outdated claims.For
fetch, we document theheadersoption, add a "Custom headers" section with an example, and correct an old callout claiming that fetch has no custom header support. Theapitoolset docs now clearly structure Properties into toolset-level fields (api_config,timeout,allow_private_ips) and theapi_configblock itself, document the${env.VAR}and${headers.NAME}placeholder support onheaders, clarify thatoutput_schemais consumed by MCP/Code Mode while runtime returns raw strings, and fix a claim that${param}automatically URL-encodes values (it does not). We add an example for reaching internal services with an SSRF callout, and update the Limitations section. Theopenapidocs gettimeoutandallow_private_ipsin the Properties table, clarified placeholder support with a note that headers are also sent on the spec fetch, and new "Custom timeout" and "Reaching internal services" sections.These changes were verified against the source of truth in
pkg/config/latest/types.go, the tool implementations,pkg/upstream/headers.go, andagent-schema.json.