-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
What Happened?
All write operations via the upsertNodes MCP tool return plain EDN strings instead of JSON. MCP clients throw a parse error on every write even though the write succeeds server-side. AI agents and automated clients cannot distinguish success from failure.
Affected responses:
- Add:
"Added: {:block 1}.","Added: {:page 1, :block 1}."etc. - Edit:
"Edited: {:block 1}."
Affects all entity types (block, page, tag, property), both HTTP API mode (-a TOKEN) and local graph mode (-g GRAPH). All read tools (listPages, getPage, searchBlocks etc.) return valid JSON correctly — only writes are affected.
Reproduce the Bug
- Enable HTTP API server in Logseq DB app
- Connect an MCP client:
logseq mcp-server --stdio -a YOUR_TOKEN - Call
upsertNodesto add a block:
[{"operation": "add", "entityType": "block", "data": {"page-id": "PAGE-UUID", "title": "test"}}]- Observe MCP client error:
Unexpected token 'A', "Added: {:block 1}." is not valid JSON - Check the app — the block was actually written successfully
Expected Behavior
A JSON-encoded success response, e.g. {"added": {"blocks": 1}}
Screenshots
N/A
Desktop or Mobile Platform Information
macOS 15.3, Desktop App DB version, CLI v0.4.3
Additional Context
The write succeeds but the client has no way to know. This makes upsertNodes unreliable for any automated or agent-based workflow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels