Skip to content

Commit 755f644

Browse files
findleyryasomaru
authored andcommitted
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 897acae commit 755f644

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
@@ -355,6 +355,8 @@ func (s *Server) callTool(ctx context.Context, req *ServerRequest[*CallToolParam
355355
if !ok {
356356
return nil, fmt.Errorf("%s: unknown tool %q", jsonrpc2.ErrInvalidParams, req.Params.Name)
357357
}
358+
// TODO: if handler returns nil content, it will serialize as null.
359+
// Add a test and fix.
358360
return st.handler(ctx, req)
359361
}
360362

0 commit comments

Comments
 (0)