Call AI Actions from Your Code – Claude Tool Use Hands-On
CODE PREVIEW
エディタを読み込み中…
P
Prompt
Create a single HTML page demonstrating how to use Claude's Tool Use (function calling) in JavaScript. Include a simple UI where the user can enter a city name and the page simulates calling a weather tool function via the Claude API concept. Use a minimal Swiper or no slider. Use GSAP for a subtle fade-in of results. Include AOS for scroll effects. Show a code snippet of the function definition and the call.
ClaudeのTool Use(関数呼び出し)をJavaScriptアプリに組み込む方法を学びます。このデモでは、ツール(例:getWeather)の定義、API経由での呼び出し、結果表示までの最小フローを示します。都市名を入力すると疑似APIラウンドトリップをシミュレート。コードスニペットでClaudeのツール定義パターンを確認できます。
Prompt Overview
Learn how to integrate Claude's Tool Use (function calling) into your JavaScript app. This demo shows a minimal flow: define a tool (e.g., getWeather), call it via the API, and display the result. The UI lets you type a city and simulates the round-trip. The code snippet highlights the function definition pattern used in Claude's tool use.
Was this prompt helpful?
Comments
Comments appear after moderation
この記事が役に立ったら投げ銭で応援
Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済
開発者が選ぶ最強ツール集
運営者が毎日使っているツール・ガジェット 6選