go-sdk/internal
Repository files (latest commit first)
Filename Latest commit message Latest commit date
rishabh fbd36cb787
docs/server: fix logging defaults and the SetLoggingLevel method name (#1251)
The Logging section of docs/server.md says "For stateful sessions" twice
in a row with opposite meanings, so one of the two sentences has to be
wrong. The default level of "info" is set in only one place in the SDK,
`StreamableHTTPHandler.ephemeralConnectOpts` in mcp/streamable.go, which
handles stateless requests; a session created through `Server.Connect`
starts with an empty `ServerSessionState.LogLevel`, and
`ServerSession.Log` returns early while the level is empty, which is
exactly what the first sentence already says. The second sentence now
reads "For stateless sessions". The same section also tells readers to
call `SetLevel`, but there is no such exported method: the client-side
call is `ClientSession.SetLoggingLevel`, and `setLevel` is only the
unexported server handler, so the pkg.go.dev link on the page points at
an anchor that does not exist. For context, the stateless default
arrived in #411 and the paragraph describing it was written later in
#497, which is where the duplicated "stateful" came from.

Checked with `go doc ./mcp ClientSession` (only `SetLoggingLevel` is
exported) and `grep -rn 'LogLevel = "info"' mcp/` (a single hit,
mcp/streamable.go:516); docs/server.md was regenerated with `go generate
./internal/docs`, and `go build ./... && go test ./...` pass.

---------

Signed-off-by: Rishabh <rishabhsaiv@gmail.com>
Co-authored-by: Guglielmo Colombo <guglielmoc@google.com>
2026-09-15 11:44:03 +00:00
..
authutil mcp: add optional issuer validator for pre-registered client validation (SEP-2352) (#946) 2026-05-29 12:46:34 +00:00
docs docs/server: fix logging defaults and the SetLoggingLevel method name (#1251) 2026-09-15 11:44:03 +00:00
json internal/json: json nesting depth check (#1200) 2026-08-27 10:47:08 +02:00
jsonrpc2 mcp: carry a cancelled notification's reason as the request's cancel cause (#1255) 2026-09-14 11:33:30 +00:00
mcpgodebug mcp: update JSON marshaling to not HTML-escape messages (#769) 2026-01-30 17:13:30 +01:00
oauthtest auth: validate unadvertised RFC 9207 iss instead of rejecting it (#1187) 2026-08-25 09:26:17 +00:00
readme mcp: add docs for tier 1 assessment (#1195) 2026-08-24 12:00:59 +02:00
util oauthex: oauth discovery checks (#1220) 2026-09-02 21:07:19 +02:00
xcontext x/tools: modernize interface{} -> any 2025-02-19 15:14:27 -08:00