Skip to content

Conversation

@jonathannorris
Copy link
Member

@jonathannorris jonathannorris commented Aug 27, 2025

Summary

  • Updated UpdateSelfTargetingIdentityArgsSchema to require a string (removed .nullable()).
  • In updateSelfTargetingIdentityHandler, treat empty string as null when calling updateUserProfile.
  • Kept MCP tool registration using Zod shapes (SDK-native).

Why

  • fixes issue where nullable wasn't working with MCP call for updating the self-targeting identity

@jonathannorris jonathannorris requested a review from a team as a code owner August 27, 2025 16:19
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 27, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
devcycle-mcp-server 929b529 Aug 27 2025, 09:15 PM

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the MCP tool for updating self-targeting identity couldn't properly clear the identity field using an empty string. The fix removes the nullable validation from the schema and adds logic to convert empty strings to null in the handler.

  • Removed .nullable() validation from UpdateSelfTargetingIdentityArgsSchema
  • Added empty string to null conversion logic in the update handler
  • Updated schema description to clarify that empty strings can be used to clear the identity

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/mcp/types.ts Removed nullable validation from UpdateSelfTargetingIdentityArgsSchema
src/mcp/tools/selfTargetingTools.ts Added logic to convert empty strings to null when updating user profile

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jonathannorris jonathannorris force-pushed the fix-self-targeting-identity-empty-string branch from bbcc4f0 to 148a485 Compare August 27, 2025 18:30
@jonathannorris jonathannorris force-pushed the fix-self-targeting-identity-empty-string branch from 148a485 to 4dd1df8 Compare August 27, 2025 18:30
@jonathannorris jonathannorris enabled auto-merge (squash) August 27, 2025 21:12
@jonathannorris jonathannorris merged commit d8e32ad into main Aug 27, 2025
9 of 10 checks passed
@jonathannorris jonathannorris deleted the fix-self-targeting-identity-empty-string branch August 27, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants