[Bug]: MCP "ask" tool exposes an empty parameters schema ({"type":"object"} with no "properties"), rejected by strict tool-calling clients
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
Start at the @app.get("/ask") endpoint and the attach_mcp registration path, then inspect the /mcp/schema output for the ask tool. Ensure its object parameters schema includes a properties key while preserving context_type, query, score_ratio, and max_results, and verify that strict MCP clients accept the generated schema.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
crawl4ai version
0.9.2
Expected Behavior
Every MCP tool exposed by the mcp server should publish a valid JSON-Schema for its parameters. For an object-type schema that means including a properties key (even if empty). Strict OpenAI-compatible tool-calling clients require parameters.properties to be present, otherwise the fail to load.
Current Behavior
The ask MCP tool publishes a parameters schema of exactly:
{ "type": "object" }
with no properties key. Strict validators reject it. LM Studio or LibreChat, for example, returns a 400 before the request even runs:
400 [{"code":"invalid_type","expected":"object","received":"undefined",
"path":[<n>,"function","parameters","properties"],"message":"Required"}]
Every other MCP tool (md, html, screenshot, pdf, crawl) works, because they are POST endpoints backed by a Pydantic body model and therefore get a fully-populated properties schema. ask is the only tool defined as @app.get("/ask") using FastAPI Query(...) params (context_type, query, score_ratio, max_results). The MCP bridge appears to derive the input schema from the Pydantic request body only, so a query-parameter endpoint yields an empty object schema. Net effect: the ask tool is unusable with any MCP client that strictly validates tool schemas, and there is no config/env flag to disable just that tool (attach_mcp registers all @mcp_tool endpoints unconditionally).
Is this reproducible?
Yes
Inputs Causing the Bug
- Any OpenAI-compatible MCP client that validates tool JSON-Schemas (e.g. LM Studio)
- Tool: ask (function name "ask_mcp_crawl4ai" in clients)
- Server: official Crawl4AI Docker deployment, MCP over /mcp/sse (or HTTP)
Steps to Reproduce
1. Run the Crawl4AI Docker server (0.9.2) with the MCP endpoint enabled.
2. GET /mcp/schema and inspect the "ask" tool — its parameters are {"type":"object"} with no "properties".
3. Connect a strict OpenAI-compatible client (LM Studio, Librechat) to the MCP endpoint, enabling the crawl4ai tools.
4. Send any chat completion that includes the tool list.
5. Observe a 400: parameters.properties "Required" for the ask tool; the request never runs.
Code snippets
Not applicable
OS
Linux (official Crawl4AI Docker image)
Python version
unclecode/crawl4ai:0.9.2 image (Python 3.x)
Browser
N/A
Browser version
N/A
Error logs & Screenshots (if applicable)
No response
- Lenguaje dominante
- Python
- Estrellas
- 84.5k
- Forks
- 8.7k
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 17
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de unclecode/crawl4ai
-
[Bug]: Reusing BFSDeepCrawlStrategy leaks the previous crawl's max_pages budget into a fresh runAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
unclecode/crawl4ai#2309 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
unclecode/crawl4ai#2147 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
unclecode/crawl4ai#2123 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
🐞 Bug 🩺 Needs Triage
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de unclecode/crawl4ai
Issues similares
-
Claiming namespace `apoint`Abiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
EclipseFdn/open-vsx.org#13573 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
collective/icalendar#1854 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rancher/rancher-ai-agent#412 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TUDelftGeodesy/DePSI#134 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
HenriquesLab/rxiv-maker#335 ·