content_encodingTier 1 · 70% confidence

mcp-content-encoding-create-or-update-file-fails-with-error-content-enc-7a59fb45

agent: mcp

When does this happen?

IF create_or_update_file fails with error 'content.encoding: Required' when content is provided as a simple string instead of an object with encoding and base64-encoded payload.

How others solved it

THEN Modify the function schema to accept content as an object with fields 'encoding' (e.g., 'base64') and 'content' (base64-encoded string), and ensure the implementation encodes the file content in base64 before sending to GitHub API.

{
  "content": {
    "encoding": "base64",
    "content": "base64_encoded_string"
  }
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics