Skip to content

Commit 9abb850

Browse files
committed
mcp: factor out reusable functions from TestStreamableServerTransport
The next CL will test stateless and distributable server transport configurations, using the HTTP testing strategy of TestStreamableServerTransport.
1 parent 0a8fe40 commit 9abb850

File tree

2 files changed

+182
-187
lines changed

2 files changed

+182
-187
lines changed

mcp/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ func (s *Server) callTool(ctx context.Context, req *ServerRequest[*CallToolParam
342342
if !ok {
343343
return nil, fmt.Errorf("%s: unknown tool %q", jsonrpc2.ErrInvalidParams, req.Params.Name)
344344
}
345+
// TODO: if handler returns nil content, it will serialize as null.
346+
// Add a test and fix.
345347
return st.handler(ctx, req)
346348
}
347349

0 commit comments

Comments
 (0)