Template
Weather widget for MCP Apps
Answer "what's the weather like?" with a card instead of a sentence. Animated SVG icons, the temperature in large type and the next hours in a row, in whatever design you choose.
Will I need a jacket this afternoon? I'm walking to the office around five.
Used show_weather
The house design: black outline, butter yellow and a marker swipe under the title.
The data it takes
| Field | Type | What it is |
|---|---|---|
| placerequired | string | |
| conditionrequired | sunny | partly-cloudy | cloudy | rain | night | |
| summary | string | Short description in the user language, e.g. "Sunny" |
| temperaturerequired | number | Celsius |
| highrequired | number | |
| lowrequired | number | |
| hours | object[] | |
| └ timerequired | string | e.g. "14:00" |
| └ temperaturerequired | number |
Sample data
{
"place": "Madrid",
"condition": "partly-cloudy",
"summary": "Partly cloudy",
"temperature": 21,
"high": 24,
"low": 13,
"hours": [
{
"time": "12:00",
"temperature": 21
},
{
"time": "13:00",
"temperature": 22
},
{
"time": "14:00",
"temperature": 24
},
{
"time": "15:00",
"temperature": 24
},
{
"time": "16:00",
"temperature": 23
},
{
"time": "17:00",
"temperature": 21
}
]
}The tool that shows it
A widget made from this template is shown by one tool. The model reads its description to decide when to call it and fills the input schema with the data. This is the definition Widgetry exports:
{
"name": "show_weather",
"title": "Weather",
"description": "Shows the weather for one place: the current condition and temperature, the high and low, and the next hours. Use it whenever the user asks about the weather or the forecast.",
"inputSchema": {
"type": "object",
"required": [
"place",
"condition",
"temperature",
"high",
"low"
],
"properties": {
"place": {
"type": "string"
},
"condition": {
"type": "string",
"enum": [
"sunny",
"partly-cloudy",
"cloudy",
"rain",
"night"
]
},
"summary": {
"type": "string",
"description": "Short description in the user language, e.g. \"Sunny\""
},
"temperature": {
"type": "number",
"description": "Celsius"
},
"high": {
"type": "number"
},
"low": {
"type": "number"
},
"hours": {
"type": "array",
"items": {
"type": "object",
"required": [
"time",
"temperature"
],
"properties": {
"time": {
"type": "string",
"description": "e.g. \"14:00\""
},
"temperature": {
"type": "number"
}
}
}
}
}
}
}More templates
- BoardColumns of cards with labels, dates and people. Like a Trello board.
- Aurora cardA featured announcement with a headline, a figure and a button, dressed differently by each design.
- 3D globeA WebGL globe with three.js that spins on its own and can be dragged, with a dot per place.
- Progress ringsGoals as SVG rings that fill up as they appear, with their percentage.
- Area chartA series over time as an SVG curve with a gradient fill that draws itself in.
- 3D carouselCards on a ring that spins in 3D with CSS perspective. Pauses on hover.
- CountdownDays, hours, minutes and seconds to an event, ticking live with a little jump.
- MilestonesFigures that count up from zero and cascade in, animated with GSAP.
- DonutParts of a whole with Chart.js: animates in and responds to the mouse.
- MetricsA row of key figures with their change against the previous period.
- Bar chartHorizontal bars with their values, in the order they arrive.
- TableRows and columns with a sticky header; the caller decides the columns.