Icon

Weather Forecast

<p>Get weather forecast for a location.</p><p>This is an example MCP tool, closely following the quickstart example of the model context protocol (MCP) linked below.</p><p>It is described in greater detail in the blog post, also linked below.</p>

URL: Model Context Protocol Quickstart Example https://modelcontextprotocol.io/quickstart/server
URL: Blog post: KNIME Business Hub as a Model Context Protocol (MCP) Server https://www.knime.com/blog/knime-as-model-context-protocol-server

Tool: Weather Forecast

Weather data from https://api.weather.gov.

Input processing

Input validation: "Ask for forgiveness" is in this case the most economic approach.

Data fetching

Fetch forecast for the given point.

Output preparation

Formulate a meaningful output text for the forecast. If something went wrong, formulate a meaningful error message.

Required output format.

lat
Table Row to Variable
text output
Container Output (JSON)
Longitude
Container Input (JSON)
Latitude
Container Input (JSON)
parse arguments
JSON Path
Catch Errors (Data Ports)
endpoint
Variable Expression
get actual forecast
GeoFile Reader
Try (Variable Ports)
Forecast to string
forecast
Table Row to Variable
on error
Table Creator
Format output
parse arguments
JSON Path
error text (if needed)
Expression
get forecast url
GeoFile Reader
Merge Variables
long
Table Row to Variable

Nodes

Extensions

Links