Skip to main content
Glama
WeatherXM

WeatherXM Pro MCP Server

Official
by WeatherXM

get_all_stations

Retrieve data for all stations connected to the WeatherXM Pro MCP Server, enabling comprehensive access to weather information. Simplify station management and monitoring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_all_stations' tool. It fetches all stations from the WeatherXM API endpoint '/stations', stringifies the response data as JSON, and handles errors by returning an error message.
    async () => { try { const response = await axiosInstance.get('/stations'); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error: any) { if (axios.isAxiosError(error)) { return { content: [{ type: "text", text: `WeatherXM API error: ${error.response?.data.message ?? error.message}` }], isError: true, }; } throw error; } }
  • src/index.ts:89-108 (registration)
    Registration of the 'get_all_stations' MCP tool using server.tool, with empty input schema (no parameters) and inline handler function.
    server.tool( "get_all_stations", {}, async () => { try { const response = await axiosInstance.get('/stations'); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error: any) { if (axios.isAxiosError(error)) { return { content: [{ type: "text", text: `WeatherXM API error: ${error.response?.data.message ?? error.message}` }], isError: true, }; } throw error; } } );
  • Empty Zod schema object indicating the tool takes no input parameters.
    {},

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WeatherXM/weatherxm-pro-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server