@@ -922,13 +922,11 @@ make_mcp_handler(const std::string& server_name, const std::string& version,
922922 fastmcpp::Json result_obj = {
923923 {" protocolVersion" , " 2024-11-05" },
924924 {" capabilities" , fastmcpp::Json{{" tools" , fastmcpp::Json::object ()}}},
925- {" serverInfo" ,
926- fastmcpp::Json{{" name" , server_name}, {" version" , version}}},
925+ {" serverInfo" , fastmcpp::Json{{" name" , server_name}, {" version" , version}}},
927926 };
928927 if (instructions.has_value ())
929928 result_obj[" instructions" ] = *instructions;
930- return fastmcpp::Json{
931- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
929+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
932930 }
933931
934932 if (method == " ping" )
@@ -1103,8 +1101,7 @@ std::function<fastmcpp::Json(const fastmcpp::Json&)> make_mcp_handler(
11031101 {" serverInfo" , serverInfo}};
11041102 if (server.instructions ().has_value ())
11051103 result_obj[" instructions" ] = *server.instructions ();
1106- return fastmcpp::Json{
1107- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
1104+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
11081105 }
11091106
11101107 if (method == " ping" )
@@ -1329,8 +1326,7 @@ make_mcp_handler(const std::string& server_name, const std::string& version,
13291326 {" serverInfo" , serverInfo}};
13301327 if (server.instructions ().has_value ())
13311328 result_obj[" instructions" ] = *server.instructions ();
1332- return fastmcpp::Json{
1333- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
1329+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
13341330 }
13351331
13361332 if (method == " ping" )
@@ -1510,8 +1506,7 @@ make_mcp_handler(const std::string& server_name, const std::string& version,
15101506 {" serverInfo" , serverInfo}};
15111507 if (server.instructions ().has_value ())
15121508 result_obj[" instructions" ] = *server.instructions ();
1513- return fastmcpp::Json{
1514- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
1509+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
15151510 }
15161511
15171512 if (method == " ping" )
@@ -1846,8 +1841,7 @@ make_mcp_handler(const FastMCP& app, SessionAccessor session_accessor)
18461841 {" serverInfo" , serverInfo}};
18471842 if (app.instructions ().has_value ())
18481843 result_obj[" instructions" ] = *app.instructions ();
1849- return fastmcpp::Json{
1850- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
1844+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
18511845 }
18521846
18531847 if (method == " ping" )
@@ -2543,8 +2537,7 @@ std::function<fastmcpp::Json(const fastmcpp::Json&)> make_mcp_handler(const Prox
25432537 {" serverInfo" , serverInfo}};
25442538 if (app.instructions ().has_value ())
25452539 result_obj[" instructions" ] = *app.instructions ();
2546- return fastmcpp::Json{
2547- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
2540+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
25482541 }
25492542
25502543 if (method == " ping" )
@@ -3009,8 +3002,7 @@ make_mcp_handler_with_sampling(const FastMCP& app, SessionAccessor session_acces
30093002 {" serverInfo" , serverInfo}};
30103003 if (app.instructions ().has_value ())
30113004 result_obj[" instructions" ] = *app.instructions ();
3012- return fastmcpp::Json{
3013- {" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
3005+ return fastmcpp::Json{{" jsonrpc" , " 2.0" }, {" id" , id}, {" result" , result_obj}};
30143006 }
30153007
30163008 if (method == " ping" )
0 commit comments