Merge pull request #725 from sushichan044/revert-670-feat/structured-content-with-type-safety

Revert "fix: add type safety for tool output schemas in ToolCallback"
This commit is contained in:
bhosmer-ant 2025-07-03 17:03:31 -04:00 • committed by GitHub
commit 9879d7a98e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,14 +43,7 @@ server.registerTool(
void country;
// Simulate weather API call
const temp_c = Math.round((Math.random() * 35 - 5) * 10) / 10;
const conditionCandidates = [
"sunny",
"cloudy",
"rainy",
"stormy",
"snowy",
] as const;
const conditions = conditionCandidates[Math.floor(Math.random() * conditionCandidates.length)];
const conditions = ["sunny", "cloudy", "rainy", "stormy", "snowy"][Math.floor(Math.random() * 5)];
const structuredContent = {
temperature: {
@ -84,4 +77,4 @@ async function main() {
main().catch((error) => {
console.error("Server error:", error);
process.exit(1);
});
});