Skip to content

Conversation

mberth
Copy link
Contributor

@mberth mberth commented Jun 13, 2025

Fix example for editing front matter fields, hoping that Claude will then understand the patch_vault_file tool properly.

I was using the patch_vault_file tool from Claude desktop and got errors like this:

Message from client:

    {
        "method": "tools/call",
        "params": {
            "name": "patch_vault_file",
            "arguments": {
                "content": "remote_possible: \"Remote-Optionen möglich\"\nurl: https://jobs.biontech.com/job/Mainz-HR-Data-Analyst-Scientist-%28mwd%29-RP-55116/1202835801/",
                "filename": "Jobs/BioNTech - HR Data Analyst Scientist.md",
                "operation": "replace",
                "target": "remote_possible: \"Remote-Optionen möglichurl:\n  https://jobs.biontech.com/job/Mainz-HR-Data-Analyst-Scientist-%28mwd%29-RP-55\\\n  116/1202835801/\"",
                "targetType": "frontmatter"
            }
        },
        "jsonrpc": "2.0",
        "id": 52
    }

Message from server:

    {
        "jsonrpc": "2.0",
        "id": 52,
        "error": {
            "code": -32603,
            "message": "MCP error -32603: Header 'Target' has invalid value: 'remote_possible: \"Remote-Optionen möglichurl:\n  https://jobs.biontech.com/job/Mainz-HR-Data-Analyst-Scientist-%28mwd%29-RP-55\\\n  116/1202835801/\"'"
        }
    }

Here it should replace only a single frontmatter field and somehow includes multiple lines.

I have given Claude extra instructions with the (fixed) example from openapi.yaml and that fixed the problem.

I didn't bother to make this problem reproducible, sorry.

Fix example for editing front matter fields
Copy link

netlify bot commented Jun 13, 2025

Deploy Preview for superb-starlight-b5acb5 canceled.

Name Link
🔨 Latest commit e59a215
🔍 Latest deploy log https://app.netlify.com/projects/superb-starlight-b5acb5/deploys/684c83794bbd920008c459b5

Copy link
Owner

@jacksteamdev jacksteamdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This fixes a real UX issue where Claude was misinterpreting the frontmatter examples. The clearer example target and typo fix will improve AI client reliability. Thanks for the detailed error logs - very helpful for understanding the problem.

@jacksteamdev jacksteamdev merged commit c99a8cb into jacksteamdev:main Jul 13, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants