TODO: Fix create_block and update_block MCP tool content type mismatch
TODO: Fix create_block and update_block MCP tool content type mismatch
Problem
The
create_block and update_block MCP tools in pal-e-docs-mcp type the content parameter as string in their Pydantic schema. But the pal-e-docs REST API expects content as a JSON dict (e.g. {"level": 4, "text": "..."} for headings, {"html": "..."} for paragraphs).This causes a catch-22:
- If Claude passes a dict, the MCP tool rejects it: "Input should be a valid string"
- If Claude passes a string, the API rejects it: "Input should be a valid dictionary"
Workaround: use
curl to call the API directly, bypassing the MCP tool entirely. This defeats the purpose of having MCP tools.Fix
Change the
content parameter type in the MCP tool schema from str to dict | str (or just dict). If string input is desired for convenience, the tool should parse JSON strings into dicts before forwarding to the API.Scope
pal-e-docs-mcp repo only. The pal-e-docs API is correct — this is purely an MCP tool schema issue.
Related
todo-block-anchor-ids— discovered alongside this bugphase-postgres-epilogue-cleanup— Epilogue item 9c