File tree Expand file tree Collapse file tree 3 files changed +2
-4
lines changed
src/modelscope_mcp_server Expand file tree Collapse file tree 3 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ async def get_mcp_server_detail(
135
135
# Additional fields
136
136
author = server_data .get ("author" , "" ),
137
137
server_config = server_data .get ("server_config" , []),
138
- env_schema = server_data .get ("env_schema" , "" ),
138
+ env_schema = server_data .get ("env_schema" , {} ),
139
139
is_hosted = server_data .get ("is_hosted" , False ),
140
140
is_verified = server_data .get ("is_verified" , False ),
141
141
source_url = server_data .get ("source_url" , "" ),
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ class McpServerDetail(McpServer):
159
159
160
160
# Configuration
161
161
server_config : Annotated [list [dict ], Field (description = "Server configuration" )] = []
162
- env_schema : Annotated [str , Field (description = "JSON schema for environment variables" )]
162
+ env_schema : Annotated [dict , Field (description = "JSON schema for environment variables" )]
163
163
164
164
# Status flags
165
165
is_hosted : Annotated [bool , Field (description = "Whether the server supports hosted mode" )]
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ def validate_server_detail_fields(server_detail):
52
52
53
53
for field in required_fields :
54
54
assert hasattr (server_detail , field ), f"Server detail should have '{ field } ' attribute"
55
-
56
55
# Validate field types
57
56
assert isinstance (server_detail .id , str ), "ID should be a string"
58
57
assert isinstance (server_detail .name , str ), "Name should be a string"
@@ -62,7 +61,6 @@ def validate_server_detail_fields(server_detail):
62
61
assert isinstance (server_detail .view_count , int ), "View count should be an integer"
63
62
assert isinstance (server_detail .github_stars , int ), "GitHub stars should be an integer"
64
63
assert isinstance (server_detail .server_config , list ), "Server config should be a list"
65
- assert isinstance (server_detail .env_schema , str ), "Env schema should be a string"
66
64
assert isinstance (server_detail .readme , str ), "Readme should be a string"
67
65
assert isinstance (server_detail .logo_url , str ), "Logo URL should be a string"
68
66
You can’t perform that action at this time.
0 commit comments