Filtering & Tool Scoping

Filtering & Tool Scoping

The MCP Server exposes multiple weather focused tools. We organize these by grouping related sets of tools into tags. You can scope to only the set of tools you need by providing tags as query parameters when connecting to the server.

This feature is useful if you plan to use multiple different MCP Servers at once. If you have many tools loaded from other servers, cutting down the total amount can aid model performance, making it easier to figure which tools can best satisfy a request.

The full list of tools and their names can be found by visiting Tools section and selecting your tag of interest.

Canonical tags

TagScopeExample usage
generalCurrent conditions, impacts, air qualityDefault for real-time answers.
forecastShort and medium range outlooksPlanning future events.
summaryAggregations and statisticsIdentify trends or totals across a period.
tropicalActive and historical tropical systemsHurricane monitoring, historical analysis.
lightningCloud-to-ground lightning observationsSafety perimeters, utility operations.

Query parameter filters

Use query parameters on the MCP endpoint when configuring an agent or SDK:

  • include_tags: Comma separated tags to allow (e.g., forecast,summary).
  • exclude_tags: Tags to remove even if previously included.
  • include_tools: Exact tool names to allow (e.g., xweather_get_current_weather).
  • exclude_tools: Exact tool names to block.
https://mcp.api.xweather.com/mcp?include_tags=weather&exclude_tools=xweather_get_tropical_cyclone_detail

Precedence rules

  1. exclude_tools
  2. exclude_tags
  3. include_tools
  4. include_tags

Client-side scoping

Many agents and SDKs support an allowed_tools or similar property when registering the MCP server. Provide the full tool IDs to ensure the model can use only what you expect:

const allowedTools = [
  "xweather_get_current_weather",
  "xweather_get_weather_forecast"
];

Combine server-side filters with client allow lists for the tightest control.

Recommended patterns

  • UI demos: Include weather and forecast to keep answers focused and fast.
  • Operations workflows: Start with weather + summary to unlock stats, then allow specific tropical tools during storm season.
  • High-sensitivity deployments: Default to exclude_tags=tropical until compliance approval is in place.