Skip to content

Enforce strict schema and add usage example#21

Merged
shellicar merged 2 commits intomainfrom
fix/strict-schema-and-example
Mar 26, 2026
Merged

Enforce strict schema and add usage example#21
shellicar merged 2 commits intomainfrom
fix/strict-schema-and-example

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Summary

  • Input schemas now reject unknown fields with .strict()
  • Usage example added to tool description to guide model input

Related Issues

Closes #20

Co-Authored-By: Claude noreply@anthropic.com

@shellicar shellicar added this to the 1.0 milestone Mar 26, 2026
@shellicar shellicar added the bug Something isn't working label Mar 26, 2026
@shellicar shellicar self-assigned this Mar 26, 2026
@shellicar shellicar enabled auto-merge (squash) March 26, 2026 14:09
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

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

Two fixes that work together perfectly:

  1. .strict() on all schemas — silent CWD bug is dead. Unknown fields rejected with clear errors instead of silently ignored.
  2. Complete example in tool description — the proven Haiku fix. One end-to-end example showing the full nested structure.

Belt and suspenders: example guides Haiku to get it right, strict catches it when it doesn't. Closes #20.

Test helper type cast looks correct — .transform() on commands means the output type needs the tuple cast.

🍌 Ship it.

@shellicar shellicar merged commit 3582fb4 into main Mar 26, 2026
3 checks passed
@shellicar shellicar deleted the fix/strict-schema-and-example branch March 26, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Haiku gets tool input wrong despite having the schema

2 participants