The `enhance` and `extract` tools always throw a server-side error when called, making them unusable via MCP.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Bug
The enhance and extract tools always throw a server-side error when called, making them unusable via MCP.
Error
Error calling tool 'enhance': Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>
Error calling tool 'extract': Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>
Root cause
The tool schemas declare several parameters as anyOf: [string, null] (e.g. location, employer, title, school, page_type), meaning null is a valid value per the schema. However the Python server rejects None at runtime with the
above error.
This happens whether the optional fields are passed explicitly as null, passed as empty strings, or omitted entirely — the MCP framework appears to populate unset optional fields as None, which the server then rejects.
Reproduction
Call enhance with any valid Person lookup:
{
"type": "Person",
"name": ["Connor Leech"],
"email": ["connor@example.com"],
"employer": "Acme",
"title": "Engineer",
"url": [],
"location": null,
"school": null
}
Call extract with just a URL:
{
"url": "https://example.com",
"format": "markdown"
}
Both fail. search_web works correctly.
Expected behavior
Optional parameters that are null or omitted should be handled gracefully by the server (ignored or treated as unset).
Environment
- Remote MCP server: https://mcp.diffbot.com/mcp?token=...
- MCP client: Claude Code CLI
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Python MCP entry points for the enhance and extract tools and inspect how their optional schema fields are passed to the server. Reproduce the calls using the payloads in this issue, then verify that null, empty, and omitted optional values no longer trigger the reported type error while search_web remains unaffected.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100