Skip to main content
Glama
kj455
by kj455

kibela_update_note_content

Modify existing Kibela note content by ID. Fetch and update markdown content with version control, ensuring accurate and complete note revisions.

Instructions

Update note content by note id. This tool allows you to modify the content of an existing Kibela note. Before updating, it fetches the current content of the note to ensure proper version control. Note that you need the note ID (not the note path) to use this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesNew content of the note in markdown format. The content will completely replace the existing note content. Make sure to include all necessary formatting, headers, and sections you want to preserve.
idYesNote id - not note path (e.g. /notes/123). If you want to update note content by note path, please use kibela_get_note_from_path tool first and get note id from the response

Implementation Reference

  • The main handler function for the 'kibela_update_note_content' tool. It validates inputs, fetches the current note content to use as baseContent for versioning, calls the GraphQL updateNoteContent mutation, and returns the response as JSON string.
    handler: async ({ id, content }) => { if (!id || !content) { throw new Error('Note id and content are required') } const noteRes = await getNote({ id }) if (!noteRes.note) { throw new Error('Note not found') } const response = await updateNoteContent({ input: { clientMutationId: uuid(), id, newContent: content, baseContent: noteRes.note.content, }, }) return { content: [ { type: 'text', text: JSON.stringify(response.updateNoteContent, null, 2), }, ], } },
  • Tool definition including name, description, and inputSchema for 'kibela_update_note_content'.
    tool: { name: 'kibela_update_note_content', description: 'Update note content by note id. This tool allows you to modify the content of an existing Kibela note. Before updating, it fetches the current content of the note to ensure proper version control. Note that you need the note ID (not the note path) to use this tool.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Note id - not note path (e.g. /notes/123). If you want to update note content by note path, please use kibela_get_note_from_path tool first and get note id from the response', }, content: { type: 'string', description: 'New content of the note in markdown format. The content will completely replace the existing note content. Make sure to include all necessary formatting, headers, and sections you want to preserve.', }, }, required: ['id', 'content'], }, },
  • Registers 'kibela_update_note_content' by mapping updateNoteContentTool to the name in toolDefinitions and exporting as TOOLS array for MCP protocol.
    const toolDefinitions = { kibela_search_notes: searchNotesTool, kibela_get_my_notes: getMyNotesTool, kibela_get_note_content: getNoteContentTool, kibela_get_note_from_path: getNoteFromPathTool, kibela_update_note_content: updateNoteContentTool, kibela_create_note: createNoteTool, } as const export type ToolName = keyof typeof toolDefinitions export const TOOLS = Object.values(toolDefinitions).map((def) => def.tool)
  • Central dispatcher function that routes tool calls by name to the corresponding handler.
    export async function handleToolRequest(name: string, args: Record<string, unknown>): Promise<ToolResponse> { try { const toolName = name as ToolName const toolDefinition = toolDefinitions[toolName] if (!toolDefinition) { throw new Error(`Unknown tool: ${name}`) } return await toolDefinition.handler(args as any) } catch (error) { console.error('Error:', error) return { content: [ { type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, } } }

Other Tools

Related Tools

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/kj455/mcp-kibela'

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