Skip to content

[BUG] edit-note tool fails with MCP error -32602: schema missing content parameter #42

@Digitpixels

Description

@Digitpixels

Description

The edit-note tool cannot be used with any operation (append, prepend, replace) due to an incomplete JSON schema. The content/new_source parameter is missing from the tool's schema definition.

Error Message

MCP error -32602: Invalid discriminator value
Expected 'delete' | 'append' | 'prepend' | 'replace'

This error occurs before the tool executes because the schema validation fails when trying to pass the content parameter.

Steps to Reproduce

  1. Try to call the edit-note tool with any operation:
  2. mcp__obsidian__edit-note({
  3. vault: "perlo",
  4. filename: "test.md",
  5. folder: "TestFolder",
  6. operation: "append",
  7. content: "test content" // ← This parameter doesn't exist in schema
  8. })
  9. Observe error -32602: Invalid discriminator value

Expected Behavior

The edit-note tool should accept a content parameter and modify the note accordingly.

Actual Behavior

Schema validation fails because the content/new_source parameter is not defined in the tool's schema properties.

Root Cause Analysis

The tool schema is incomplete. It defines:

  • ✅ vault
    • ✅ filename
      • ✅ folder
        • ✅ operation (with correct enum values)
          • MISSING: content or new_source parameter
            The tool cannot function without the parameter to specify what content to append/prepend/replace.

Workaround

Until fixed, use a read-modify-delete-recreate approach:

  1. Read the current note with read-note
    1. Modify content in memory
    1. Delete the note with delete-note
    1. Create a new note with the modified content using create-note
      This preserves the note name but loses file history.

Additional Information

  • MCP Server: obsidian-mcp v1.0.6
    • Other tools working fine: create-note, read-note, delete-note, search-vault, add-tags, remove-tags
      • Impact: Cannot automate note modifications (e.g., updating planning documents, appending to lists)
        • Version: tested with latest obsidian-mcp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions