Skip to main content
Glama
kj455

MCP Kibela

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,
        }
      }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it's a mutation operation ('modify the content'), includes version control through fetching current content first, and has a prerequisite (note ID requirement). It doesn't mention authentication needs, rate limits, or error conditions, but covers the essential mutation behavior adequately.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with three focused sentences: purpose statement, behavioral detail about version control, and usage prerequisite. Every sentence adds value with no redundancy or wasted words, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description does well by explaining the operation, version control behavior, and prerequisites. It could be more complete by mentioning what happens on success/failure or the response format, but given the 100% schema coverage and clear behavioral disclosure, it's mostly adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds minimal value beyond the schema - it reinforces that 'id' is required and not a path, and that 'content' replaces existing content, but doesn't provide additional semantic context beyond what's in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Update note content'), target resource ('existing Kibela note'), and distinguishes from siblings by specifying it requires note ID rather than note path. It explicitly differentiates from kibela_get_note_from_path and kibela_get_note_content tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool (to modify content of existing notes) and when not to use it (requires note ID, not note path). It also mentions an alternative approach (use kibela_get_note_from_path first) and distinguishes from sibling tools like kibela_create_note and kibela_get_note_content.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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