-
Notifications
You must be signed in to change notification settings - Fork 12
Commit 32abb0a
fix: Use individual parameters with docstring descriptions instead of Pydantic models for proper FastMCP schema generation
## Problem
The initial implementation used Pydantic models as single 'params' arguments, which caused
FastMCP to nest all parameter descriptions under the 'params' key instead of exposing them
as top-level parameters. The MCP quality scoring system expects top-level parameter descriptions
in the tools' inputSchema.
## Solution
- Changed all 8 tools from using Pydantic input models to individual parameters
- Moved parameter descriptions from Pydantic Field() to docstring Args sections
- Removed unused Pydantic input model classes (MarkdownifyInput, SmartscraperInput, etc.)
- Kept ConfigSchema as it's required for Smithery configuration
## Changes
1. markdownify: website_url as direct parameter with docstring description
2. smartscraper: user_prompt, website_url, number_of_scrolls, markdown_only as individual params
3. searchscraper: user_prompt, num_results, number_of_scrolls as individual params
4. smartcrawler_initiate: url, prompt, extraction_mode, depth, max_pages, same_domain_only as individual params
5. smartcrawler_fetch_results: request_id as direct parameter
6. scrape: website_url, render_heavy_js as individual params
7. sitemap: website_url as direct parameter
8. agentic_scrapper: url, user_prompt, output_schema, steps, ai_extraction, persistent_session, timeout_seconds as individual params
## FastMCP Schema Generation
FastMCP now generates inputSchema with top-level properties and descriptions from the
docstring Args section, which will be properly recognized by the MCP quality scoring system.
## Expected Impact
This fix should enable the +12 points for "Parameter descriptions (0/8 tools)" to be awarded,
bringing the quality score from 78/100 to 90/100 (with annotations already at +9pts).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c1ae97e commit 32abb0aCopy full SHA for 32abb0a
File tree
Expand file treeCollapse file tree
1 file changed
+107
-162
lines changedOpen diff view settings
Filter options
- src/scrapegraph_mcp
Expand file treeCollapse file tree
1 file changed
+107
-162
lines changedOpen diff view settings
0 commit comments