Jonathan Amsterdam
edda031578
internal/mcp: implement logging
...
Provide a ServerSession method that directly implements the spec
method.
Also provide a custom slog.Handler that writes a notification on each
log call. It uses a slog.JSONHandler to format the message as JSON, then
adds the additional fields of LoggingMessageParams.
I decided that the direct method should handle levels, since that is
in the spec, but that rate-limiting is an extra feature, so is only
provided in the slog handler.
Change-Id: I1190ca124e992e61fb633ac52ee3492c8e6d99c9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/674498
Auto-Submit: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2025-05-22 15:02:13 -07:00
..
testdata /files
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
client.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
cmd.go
internal/mcp: add a command transport for connecting to a sidecar
2025-05-01 17:43:04 -07:00
cmd_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
content.go
internal/mcp: pointerize all the things
2025-05-14 06:22:56 -07:00
content_test.go
internal/mcp: pointerize all the things
2025-05-14 06:22:56 -07:00
features.go
internal/mcp: keep an ordered list of feature keys
2025-05-20 13:37:12 -07:00
features_test.go
internal/mcp: keep an ordered list of feature keys
2025-05-20 13:37:12 -07:00
generate.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
logging.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
mcp.go
internal/mcp: construct README with weave
2025-05-21 16:21:26 -07:00
mcp_test.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
prompt.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
prompt_test.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
protocol.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
resource.go
internal/mcp: sampling
2025-05-19 11:15:58 -07:00
resource_go124.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
resource_pre_go124.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
resource_test.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
root.go
internal/mcp: implement roots
2025-05-13 07:52:49 -07:00
server.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
server_example_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
shared.go
internal/mcp: add notifications
2025-05-21 16:01:46 -07:00
sse.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
sse_example_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
sse_test.go
internal/mcp: reinstate ClientSession
2025-05-14 12:41:58 -07:00
tool.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
tool_test.go
internal/mcp/design: further clean-up
2025-05-14 14:28:07 -07:00
transport.go
internal/mcp: dispatcher middleware
2025-05-16 11:24:52 -07:00
transport_test.go
internal/mcp: implement HTTP SSE transport
2025-04-23 19:15:20 -07:00
util.go
internal/mcp: simplify content
2025-05-13 15:03:25 -07:00