microsoft / microsoft/markitdown

MCP server returns "Field required [type=missing, input_value={}, input_type=dict]" for valid convert_to_markdown input

Open
#1,362 3 comments 1 reaction 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

Describe the bug

When calling the convert_to_markdown tool via HTTP with a valid uri (either a local file or a public internet PDF), the server responds with a validation error stating that the required field uri is missing, even though it is present in the request.

To Reproduce

  1. Start the MCP server in HTTP mode (Docker or pip install, both tested).
  2. Send the following JSON-RPC request (example with a public PDF):
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "convert_to_markdown",
    "input": {
      "uri": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
    }
  },
  "id": "2"
}

With headers:

Content-Type: application/json
Accept: application/json, text/event-stream
  1. The response is:
{
  "jsonrpc": "2.0",
  "id": "2",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Error executing tool convert_to_markdown: 1 validation error for convert_to_markdownArguments\nuri\n  Field required [type=missing, input_value={}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.11/v/missing"
      }
    ],
    "isError": true
  }
}

Expected behavior

The server should recognize the uri field and process the file, returning the Markdown result or a relevant error if the file cannot be accessed.

Additional context

  • The same error occurs for both local files (with correct Docker volume mount and file path) and public URLs.
  • The request JSON matches the tool schema returned by tools/list.
  • MCP server version: (please specify Docker image hash or pip version)
  • Example debug output and full request/response attached.

Environment

  • OS: [Windows 11]
  • MCP server version: [Docker image hash or pip version]
  • How you started the server: [docker run --rm -i -v C:\Example\Path\Stuff:/workdir -p 3001:3001 markitdown-mcp:latest --http --host 0.0.0.0 --port 3001]

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 tracing the HTTP JSON-RPC tools/call handling for the convert_to_markdown entry point, then compare how its input is forwarded with the schema returned by tools/list. Done means the uri reaches validation and both local-file and public-URL requests return Markdown or a relevant access error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.