Skip to content

feat(tools): coerce coordinate-driven inputs across tool handlers#243

Merged
demid-ns merged 2 commits into
yuniko-software:mainfrom
Noptus:main
Feb 26, 2026
Merged

feat(tools): coerce coordinate-driven inputs across tool handlers#243
demid-ns merged 2 commits into
yuniko-software:mainfrom
Noptus:main

Conversation

@Noptus
Copy link
Copy Markdown
Contributor

@Noptus Noptus commented Feb 20, 2026

  • add coerceCoordinates() validation at the top of all x/y/z handlers
  • switch coordinate schemas from z.number() to z.coerce.number()
  • coerce spatial numeric params like range and maxDistance for consistency
  • ensure dig-block and other position-based tools handle numeric-like inputs safely

Noptus and others added 2 commits February 20, 2026 21:15
- add `coerceCoordinates()` validation at the top of all `x/y/z` handlers
- switch coordinate schemas from `z.number()` to `z.coerce.number()`
- coerce spatial numeric params like `range` and `maxDistance` for consistency
- ensure `dig-block` and other position-based tools handle numeric-like inputs safely
Copy link
Copy Markdown
Member

@demid-ns demid-ns left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! The coercion for coordinate inputs makes sense. I've made a few follow-up tweaks on top of your changes. Merged!

@demid-ns demid-ns merged commit 0491bad into yuniko-software:main Feb 26, 2026
1 check 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