File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1717import httpx
1818from fastmcp import Context , FastMCP
1919from smithery .decorators import smithery
20- from pydantic import BaseModel , Field
20+ from pydantic import BaseModel , Field , AliasChoices
2121
2222# Configure logging
2323logging .basicConfig (
@@ -342,7 +342,11 @@ def close(self) -> None:
342342class ConfigSchema (BaseModel ):
343343 scrapegraph_api_key : Optional [str ] = Field (
344344 default = None ,
345- description = "Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)"
345+ description = "Your Scrapegraph API key (optional - can also be set via SGAI_API_KEY environment variable)" ,
346+ # Accept both camelCase (from smithery.yaml) and snake_case (internal) for validation,
347+ # and serialize back to camelCase to match Smithery expectations.
348+ validation_alias = AliasChoices ("scrapegraphApiKey" , "scrapegraph_api_key" ),
349+ serialization_alias = "scrapegraphApiKey" ,
346350 )
347351
348352
You can’t perform that action at this time.
0 commit comments