Commit 4c540e2
Add metadata field to SearchAndGeocodeTool schema
The Mapbox Search Box API can return metadata (including primary_photo
and Japanese reading information) for various feature types in forward
geocoding results. Currently, SearchAndGeocodeTool.output.schema.ts
doesn't include a metadata field, which could lead to validation errors
when the API returns this data.
This fix adds the metadata field with the same structure used in
CategorySearchTool (fixed in PR #77):
- primary_photo: Accepts both string and array of strings
- reading: Optional Japanese reading information (ja_kana, ja_latin)
This prevents validation failures when the API returns metadata fields.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 617f562 commit 4c540e2
File tree
1 file changed
+14
-0
lines changed- src/tools/search-and-geocode-tool
1 file changed
+14
-0
lines changedLines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
0 commit comments