From 37ff85f4b1f0d85f8265cfdc55e9b7b20fafe3dc Mon Sep 17 00:00:00 2001 From: Yurii Chukhlib Date: Sat, 17 Jan 2026 11:24:20 +0100 Subject: [PATCH] fix: Add docstring to MCP tool 'md' endpoint Fixes #1652 The `get_markdown` function was missing a docstring, which caused the MCP tool 'md' to have no description when exposed via `_list_tools()`. This made it difficult for LLMs and developers to understand the tool's purpose. Added comprehensive docstring describing the tool's functionality and supported extraction modes. Co-Authored-By: Claude --- deploy/docker/server.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deploy/docker/server.py b/deploy/docker/server.py index 62e4e4413..b79c229e6 100644 --- a/deploy/docker/server.py +++ b/deploy/docker/server.py @@ -308,6 +308,17 @@ async def get_markdown( body: MarkdownRequest, _td: Dict = Depends(token_dep), ): + """ + Convert a web page into Markdown format. + + Supports multiple extraction modes: + - fit (default): Readability-based extraction for clean content + - raw: Direct DOM to Markdown conversion + - bm25: BM25 relevance ranking with optional query + - llm: LLM-based summarization with optional query + + Use this tool when you need clean, readable text from web pages. + """ 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://)")