Skip to content

[MCP Plugin]: Unable to use update tool on fields with union type #14942

Closed

Description

@pranavks

Describe the Bug

In MCP Plugin, the built-in update tool is not able to update top level fields with union type.

Example: With built-in id field which has union type:
Image

Example: With a custom top level field which has union type:
Image

Interestingly the nested fields with union type are updating fine.

Link to the code that reproduces this issue

Reproduction steps given below

Reproduction Steps

Method 1:
Use built-in update tool to update a post using its id (not using where clause).

Method 2:
Create a top level text field (non-required field). Its union type will be string | null. Try to update this field using the update tool.

Which area(s) are affected?

plugin: mcp

Environment Info

Binaries:
  Node: 22.13.0
  npm: 10.9.2
  Yarn: 1.22.19
  pnpm: 9.15.1
Relevant Packages:
  payload: 3.68.5
  next: 15.5.9
  @payloadcms/db-postgres: 3.68.5
  @payloadcms/drizzle: 3.68.5
  @payloadcms/graphql: 3.68.5
  @payloadcms/live-preview: 3.68.5
  @payloadcms/live-preview-react: 3.68.5
  @payloadcms/next/utilities: 3.68.5
  @payloadcms/plugin-cloud-storage: 3.68.5
  @payloadcms/plugin-mcp: 3.68.5
  @payloadcms/plugin-redirects: 3.68.5
  @payloadcms/plugin-search: 3.68.5
  @payloadcms/plugin-seo: 3.68.5
  @payloadcms/richtext-lexical: 3.68.5
  @payloadcms/storage-s3: 3.68.5
  @payloadcms/translations: 3.68.5
  @payloadcms/ui/shared: 3.68.5
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:33:36 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11

Activity

  1. added
    status: needs-triage
    validate-reproduction
    on Dec 16, 2025
  2. added and removed
    validate-reproduction
    on Dec 16, 2025
  3. github-actions commented on Dec 16, 2025

    @github-actions
    Contributor

    Please add a reproduction in order for us to be able to investigate.

    Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided.

    Why was this issue marked with the invalid-reproduction label?

    To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with create-payload-app@latest -t blank or a forked/branched version of this repository with tests added (more info in the reproduction-guide).

    To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.

    Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.

    I added a link, why was it still marked?

    Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.

    Useful Resources

  4. removed
    status: needs-triage
    on Dec 16, 2025
  5. added a commit that references this issue on Feb 17, 2026
    31b4a06
  6. added a commit that references this issue on Feb 17, 2026
    9ae89dd
  7. github-actions commented on Feb 18, 2026

    @github-actions
    Contributor

    🚀 This is included in version v3.77.0

  8. github-actions commented on Feb 26, 2026

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  9. locked as resolved and limited conversation to collaborators on Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions