Skip to main content
Glama
by RadonX
debug-update-note.js•1.1 kB
#!/usr/bin/env node console.log('šŸ” Update Note API Debugging'); console.log('============================'); console.log('āŒ CURRENT IMPLEMENTATION (WRONG):'); console.log('await triliumClient.put(`notes/${noteId}/content`, { content });'); console.log(''); console.log('Sends JSON: { "content": "note content here" }'); console.log('Content-Type: application/json'); console.log(''); console.log('āœ… TRILIUM API EXPECTS (CORRECT):'); console.log('PUT /notes/{noteId}/content'); console.log('Content-Type: text/plain'); console.log('Request body: raw string content'); console.log(''); console.log('šŸ”§ REQUIRED FIX:'); console.log('Send raw content string, not JSON object'); console.log('Set Content-Type to text/plain'); console.log(''); console.log('šŸ“ IMPLEMENTATION CHANGE NEEDED:'); console.log('// OLD:'); console.log('await triliumClient.put(`notes/${noteId}/content`, { content });'); console.log(''); console.log('// NEW:'); console.log('await triliumClient.putRaw(`notes/${noteId}/content`, content);'); console.log('// OR modify existing put method to handle raw content');

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RadonX/mcp-trilium'

If you have feedback or need assistance with the MCP directory API, please join our Discord server