Skip to content

Conversation

@majiayu000
Copy link

Summary

Fixes #1652

The get_markdown endpoint was missing a docstring, causing the MCP tool to have an empty description when listed via list_tools(). This made it difficult for LLMs to understand the tool's purpose.

List of files changed and why

  • deploy/docker/server.py - Added docstring to get_markdown function explaining the supported extraction modes (fit, raw, bm25, llm) and when to use this tool
  • tests/unit/test_mcp_tool_docstrings.py - Added unit test using AST parsing to verify MCP tool docstrings are present

How Has This Been Tested?

  • Unit test verifies docstring exists and contains expected content
  • Test uses AST parsing to avoid import dependency issues

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added/updated unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Fixes unclecode#1652

The get_markdown endpoint was missing a docstring, causing the MCP tool
to have an empty description when listed. This made it difficult for
LLMs to understand the tool's purpose.

Added a descriptive docstring explaining the supported extraction modes
(fit, raw, bm25, llm) and when to use this tool.

Also added a unit test to verify MCP tool docstrings are present.

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant