Repository navigation
fix(website): support string-valued agent tools metadata - #6303
Conversation
Accept scalar and comma-separated tools declarations alongside YAML lists, and report invalid values with the source filename. Add regression coverage and document the supported formats. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🚦 Submission status: 👀 Ready for reviewRisk tier: Why this tier
Automated checks
Review
Commands
Updated for |
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the tool-metadata normalization change.
No open issues 🎉
What changed in this PR
Fixes website metadata generation for string-valued agent tools, addressing the build failure exposed by #6269 while preserving existing YAML list support.
Changes:
- Normalize scalar and comma-separated tool strings into arrays; report invalid types with the source filename.
- Add regression tests for supported formats, empty values, invalid types, and tool filter facets.
- Document supported formats and the focused test command.
| File | Description |
|---|---|
website/README.md |
Documents supported tool declarations and regression tests. |
eng/generate-website-data.test.mjs |
Tests tool normalization, filter facets, and validation errors. |
eng/generate-website-data.mjs |
Normalizes and validates tools; enables isolated testing without running the full generator on import. |
Review effort: Balanced (auto)
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
The website build exposed by #6269 fails during metadata generation with
TypeError: tools.forEach is not a function. The new agent usestools: new-relic-mcp-server/*, a string declaration explicitly supported by the custom agent configuration reference, but the generator assumes an array.Normalize scalar and comma-separated tool strings into arrays before generating agent metadata and filter facets, while preserving existing list declarations. Invalid types now fail with the source filename. Add focused regression coverage and document the supported formats. No CI workflow change is needed.
Relates to #6269.
Type of Contribution
Additional Notes
Original failure: website preview build, step 7. Astro never started; the failure was in
website:data.Validation:
node --test eng\generate-website-data.test.mjs eng\yaml-parser.test.mjs- passed, 24 tests covering string/list tools, comma separation, missing/empty values, invalid types, and existing YAML parsing behavior.npm run website:build- passed, 1,600 pages built.npm start- passed; no generated README or marketplace changes.bash eng/fix-line-endings.sh- passed.git diff --check- passed before committing.Resource-authoring and paid-service checklist items are not applicable to this infrastructure fix.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.