Skip to content

Fix: Handle nested objects in array items for JSON schema conversion - #6993

Merged
Eric Zhu (ekzhu) merged 4 commits into
microsoft:mainfrom
kkutrowski:fix-json-schema-array-objects
Sep 18, 2025
Merged

Fix: Handle nested objects in array items for JSON schema conversion#6993
Eric Zhu (ekzhu) merged 4 commits into
microsoft:mainfrom
kkutrowski:fix-json-schema-array-objects

Conversation

@kkutrowski

@kkutrowski kkutrowski commented Sep 5, 2025

Copy link
Copy Markdown
Contributor
  • Modified _extract_field_type to recursively process object schemas in arrays
  • Added test case for array items with defined object properties

Why are these changes needed?

The changes are needed so the agents can see entire tools input schema properly.

Related issue number

Closes #6991

Checks

  - Modified _extract_field_type to recursively process object schemas in arrays
  - Added test case for array items with defined object properties
  - Fixes issue microsoft#6991
@kkutrowski
kkutrowski marked this pull request as draft September 5, 2025 11:07
@kkutrowski
kkutrowski marked this pull request as ready for review September 5, 2025 11:11
@kkutrowski

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="PFEIFER & LANGEN BUSINESS SOLUTIONS"

@ekzhu Eric Zhu (ekzhu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally speaking, it is a good idea to avoid using complex data types for tool arguments. They tend to degrade model performance. While the fix here is valid, we don't recommend passing in complex data types for tools.

@codecov

codecov Bot commented Sep 16, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.96%. Comparing base (17d3aef) to head (fe3d308).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6993   +/-   ##
=======================================
  Coverage   80.95%   80.96%           
=======================================
  Files         238      238           
  Lines       18271    18279    +8     
=======================================
+ Hits        14791    14799    +8     
  Misses       3480     3480           
Flag Coverage Δ
unittests 80.96% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekzhu
Eric Zhu (ekzhu) merged commit fb03c1c into microsoft:main Sep 18, 2025
74 checks 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.

MCP tools with complex input schema (array)

2 participants