-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
🐞 BugSomething isn't workingSomething isn't working🐳 DockerDocker issueDocker issue📌 Root causedidentified the root cause of bugidentified the root cause of bug
Description
crawl4ai version
0.7.7
Expected Behavior
A description for the md tool intended at LLMs.
Current Behavior
The md tool has no description
_list_tools function is pulling descriptions via inspect.getdoc() which pulls the documentation string
crawl4ai/deploy/docker/mcp_bridge.py
Lines 114 to 124 in 3a07c59
| # MCP handlers | |
| @mcp.list_tools() | |
| async def _list_tools() -> List[t.Tool]: | |
| out = [] | |
| for k, (proxy, orig_fn) in tools.items(): | |
| desc = getattr(orig_fn, "__mcp_description__", None) or inspect.getdoc(orig_fn) or "" | |
| schema = getattr(orig_fn, "__mcp_schema__", None) or _schema(_body_model(orig_fn)) | |
| out.append( | |
| t.Tool(name=k, description=desc, inputSchema=schema) | |
| ) | |
| return out |
but there is no docstring for it
crawl4ai/deploy/docker/server.py
Lines 303 to 325 in 3a07c59
| @app.post("/md") | |
| @limiter.limit(config["rate_limiting"]["default_limit"]) | |
| @mcp_tool("md") | |
| async def get_markdown( | |
| request: Request, | |
| body: MarkdownRequest, | |
| _td: Dict = Depends(token_dep), | |
| ): | |
| if not body.url.startswith(("http://", "https://")) and not body.url.startswith(("raw:", "raw://")): | |
| raise HTTPException( | |
| 400, "Invalid URL format. Must start with http://, https://, or for raw HTML (raw:, raw://)") | |
| markdown = await handle_markdown_request( | |
| body.url, body.f, body.q, body.c, config, body.provider, | |
| body.temperature, body.base_url | |
| ) | |
| return JSONResponse({ | |
| "url": body.url, | |
| "filter": body.f, | |
| "query": body.q, | |
| "cache": body.c, | |
| "markdown": markdown, | |
| "success": True | |
| }) |
Is this reproducible?
Yes
Inputs Causing the Bug
Steps to Reproduce
Code snippets
OS
docker.io/unclecode/crawl4ai:0.7.7
Python version
docker.io/unclecode/crawl4ai:0.7.7
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response
Metadata
Metadata
Assignees
Labels
🐞 BugSomething isn't workingSomething isn't working🐳 DockerDocker issueDocker issue📌 Root causedidentified the root cause of bugidentified the root cause of bug