@@ -304,7 +304,7 @@ def close(self) -> None:
304304
305305# Pydantic configuration schema for Smithery
306306class ConfigSchema (BaseModel ):
307- api_key : str = Field (..., description = "Your Scrapegraph API key" )
307+ scrapegraph_api_key : str = Field (..., description = "Your Scrapegraph API key" )
308308
309309
310310# Create MCP server
@@ -324,7 +324,7 @@ def markdownify(website_url: str, ctx: Context) -> Dict[str, Any]:
324324 Dictionary containing the markdown result
325325 """
326326 try :
327- client = ScapeGraphClient (ctx .session_config .api_key )
327+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
328328 return client .markdownify (website_url )
329329 except Exception as e :
330330 return {"error" : str (e )}
@@ -352,7 +352,7 @@ def smartscraper(
352352 Dictionary containing the extracted data or markdown content
353353 """
354354 try :
355- client = ScapeGraphClient (ctx .session_config .api_key )
355+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
356356 return client .smartscraper (user_prompt , website_url , number_of_scrolls , markdown_only )
357357 except Exception as e :
358358 return {"error" : str (e )}
@@ -378,7 +378,7 @@ def searchscraper(
378378 Dictionary containing search results and reference URLs
379379 """
380380 try :
381- client = ScapeGraphClient (ctx .session_config .api_key )
381+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
382382 return client .searchscraper (user_prompt , num_results , number_of_scrolls )
383383 except Exception as e :
384384 return {"error" : str (e )}
@@ -414,7 +414,7 @@ def smartcrawler_initiate(
414414 Dictionary containing the request ID for async processing
415415 """
416416 try :
417- client = ScapeGraphClient (ctx .session_config .api_key )
417+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
418418 return client .smartcrawler_initiate (
419419 url = url ,
420420 prompt = prompt ,
@@ -441,7 +441,7 @@ def smartcrawler_fetch_results(request_id: str, ctx: Context) -> Dict[str, Any]:
441441 and metadata about processed pages
442442 """
443443 try :
444- client = ScapeGraphClient (ctx .session_config .api_key )
444+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
445445 return client .smartcrawler_fetch_results (request_id )
446446 except Exception as e :
447447 return {"error" : str (e )}
@@ -458,7 +458,7 @@ def scrape(website_url: str, ctx: Context, render_heavy_js: Optional[bool] = Non
458458 render_heavy_js: Whether to render heavy JS (optional)
459459 """
460460 try :
461- client = ScapeGraphClient (ctx .session_config .api_key )
461+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
462462 return client .scrape (website_url = website_url , render_heavy_js = render_heavy_js )
463463 except httpx .HTTPError as http_err :
464464 return {"error" : str (http_err )}
@@ -476,7 +476,7 @@ def sitemap(website_url: str, ctx: Context) -> Dict[str, Any]:
476476 website_url: Base website URL
477477 """
478478 try :
479- client = ScapeGraphClient (ctx .session_config .api_key )
479+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
480480 return client .sitemap (website_url = website_url )
481481 except httpx .HTTPError as http_err :
482482 return {"error" : str (http_err )}
@@ -528,7 +528,7 @@ def agentic_scrapper(
528528 return {"error" : f"Invalid JSON for output_schema: { str (e )} " }
529529
530530 try :
531- client = ScapeGraphClient (ctx .session_config .api_key )
531+ client = ScapeGraphClient (ctx .session_config .scrapegraph_api_key )
532532 return client .agentic_scrapper (
533533 url = url ,
534534 user_prompt = user_prompt ,
@@ -548,7 +548,7 @@ def agentic_scrapper(
548548
549549# Smithery server function with Pydantic config schema
550550@smithery .server (config_schema = ConfigSchema )
551- def create_server (config : Optional [ ConfigSchema ] = None ) -> FastMCP :
551+ def create_server () -> FastMCP :
552552 """
553553 Create and return the FastMCP server instance for Smithery deployment.
554554
0 commit comments