feat: add MCP prompts for document conversion, generation, and manipulation#92
Open
vivek12345 wants to merge 1 commit into
Open
feat: add MCP prompts for document conversion, generation, and manipulation#92vivek12345 wants to merge 1 commit into
vivek12345 wants to merge 1 commit into
Conversation
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
…lation Signed-off-by: Vivek Nayyar <vivek.of.nayyar@gmail.com>
1b28e55 to
a7e458a
Compare
Author
|
@ceberam Please help review |
Author
|
Hello @ceberam. Is there anything you would like me to add to this? |
Author
|
Hello @ceberam any chance to review this? |
Contributor
|
✅ DCO Check Passed Thanks @vivek12345, all your commits are properly signed off. 🎉 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces MCP Prompts to the Docling MCP server — a first-class MCP
protocol feature that exposes reusable, parameterized prompt templates to clients
like Claude Desktop.
Previously, the server exposed only tools. Users had to know the correct tool
names and call sequences to accomplish multi-step workflows. Prompts solve this
by encoding those workflows as invocable templates with named arguments.
What's added:
docling_mcp/prompts/— new package with 3 modules:conversion.py— 3 prompts:generate_docling_document_from_pdf(file_path)— convert a local PDF andreturn the document key
convert_and_summarize(source)— convert any document and produce astructured summary (title, sections, key takeaways)
convert_directory_and_list(directory)— batch convert a directory anddisplay results as a table
generation.py— 2 prompts:author_structured_document(topic, sections)— guides the LLM through thefull document creation sequence including the open/close list stack discipline
convert_and_rewrite(source, instructions)— convert a source document thenrewrite it following custom instructions into a new Docling document
manipulation.py— 2 prompts:review_and_edit_document(document_key)— shows document structure viaanchors then interactively edits based on user input
find_and_replace_in_document(document_key, search_text, replacement_text)—search-then-update workflow with confirmation for non-exact matches
docling_mcp/servers/mcp_server.py— prompts are imported unconditionally insidemain()after the tool group imports, so they are always registered regardlessof which tool groups are selected.
How prompts appear in clients:
In Claude Desktop, registered prompts appear in the prompt picker and can be
invoked with named arguments. Each prompt injects a user message that encodes
the correct tool call sequence for that workflow.
Checklist for the PR template sections:
Issue resolved by this Pull Request:
Resolves # #36