Skip to content

Conversation

@rasdani
Copy link
Contributor

@rasdani rasdani commented Dec 31, 2025

Description

  • Filters function signature before schema generation to avoid strict JSON schema validation errors on skipped parameters
  • Parameters with dict type (which produce additionalProperties: true) no longer cause validation failures when listed in args_to_skip

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Improves tool schema generation to prevent JSON schema validation errors when skipping arguments.

  • Adds filter_signature to wrap functions with a filtered signature/annotations (non-destructive) for schema creation
  • Updates StatefulToolEnv.add_tool to use convert_func_to_oai_tool(filter_signature(...)), ensuring skipped args (incl. dict types) are absent from the exposed schema
  • Maintains original function and bound method signatures; new tests cover dict-typed arg skipping and non-mutation of signatures

Written by Cursor Bugbot for commit 6697842. This will update automatically on new commits. Configure here.

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