microsoft / microsoft/markitdown

markitdown-mcp: Enhance tool to improve AI agent discoverability for file conversion tasks

Open Beginner friendly
#1,424 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

Problem

My AI agent is not selecting the convert_to_markdown tool when requesting file conversion to markdown format. Instead, it attempts to write Python code to perform the conversion manually, even when the markitdown MCP tool is available.

This is a simple prompt like "Please convert ~/path/to/filename.xslx to markdown."

It does successfully use the tool if I prod it with "Use the convert_to_markdown tool to convert ~/path/to/filename.xslx to markdown." but that amount of prodding shouldn't be necessary.

Current State

The current docstring is minimal and doesn't clearly indicate the tool's purpose for AI decision-making:

"""Convert a resource described by an http:, https:, file: or data: URI to markdown"""
Suggested Enhanced Docstring

This altered docstring was given to me by an AI. I tested using this version and the tool was chosen automatically for the same prompt, along with other prompts that just asked the AI to give me certain data from the same excel file.

"""Convert files and documents to markdown format from various sources.

This tool handles file conversion and document conversion to markdown from multiple formats
including PDFs, Word documents, PowerPoint presentations, Excel files, images, and more.
Use this tool when users request converting, transforming, or processing files to markdown.

Supports http:, https:, file:, and data: URIs for both local and remote file conversion.
This is the recommended approach for any markdown conversion tasks rather than writing custom code.
"""

This is just an example - other docstrings would surely work. The important note is that additional context within the docstring will assist the AI in knowing what the tool is truly capable of.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the convert_to_markdown tool definition and read its current docstring. Update the description so its conversion purpose, supported document types, URI sources, and intended use for markdown conversion are clear to AI agents; done when the tool communicates this scope without requiring extra prompting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.