Skip to main content
Glama
WeatherXM

WeatherXM Pro MCP Server

Official
by WeatherXM

search_cells_in_region

Locate specific weather data cells within a region by entering the region name with WeatherXM Pro MCP Server’s tool, streamlining precise data retrieval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_queryYesThe name of the region to search for cells

Implementation Reference

  • Handler function for the 'search_cells_in_region' tool. Makes an API call to '/cells/search' with the region_query parameter and returns the JSON response or an error.
    async ({ region_query }) => {
      try {
        const response = await axiosInstance.get('/cells/search', {
          params: { query: region_query },
        });
        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;
      }
    }
  • Input schema for the 'search_cells_in_region' tool, defining the 'region_query' parameter as a string.
    {
      region_query: z.string().describe("The name of the region to search for cells"),
    },
  • src/index.ts:162-185 (registration)
    Registration of the 'search_cells_in_region' MCP tool using server.tool, including schema and handler.
    server.tool(
      "search_cells_in_region",
      {
        region_query: z.string().describe("The name of the region to search for cells"),
      },
      async ({ region_query }) => {
        try {
          const response = await axiosInstance.get('/cells/search', {
            params: { query: region_query },
          });
          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;
        }
      }
    );
Install Server

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