Skip to main content
Glama
beF99

israel-weather-mcp-agent

by beF99

Israel Weather MCP Agent

מטרת הפרויקט

הפרויקט מממש MCP Server ייעודי לתחזית מזג אוויר בישראל באמצעות Playwright, ללא שימוש ב-API מובנה.

המערכת כוללת:

  1. host.py - צ'אט טרמינל שמפעיל LLM + Tools.

  2. weather_Israel.py - MCP Server עם כלים לניווט באתר תחזית ישראלי, חיפוש עיר, בחירה ברשימה וחילוץ תוכן.

  3. weather_USA.py - שרת דוגמה קיים לתחזית בארה"ב.

Related MCP server: Weather Israel MCP

סטאק טכנולוגי

  1. Python

  2. MCP SDK

  3. Playwright

  4. OpenAI API (Tool Calling)

איך להריץ

להריץ מתוך תיקיית project-template:

cd project-template
uv sync
uv run playwright install chromium
uv run host.py

הגדרת משתני סביבה

יש ליצור/לעדכן קובץ .env:

OPENAI_API_KEY=your_openai_key_here
OPENAI_MODEL=gpt-4.1-mini

סימולטור ויזואלי

ניתן לפתוח את תרשים הזרימה של המשימה באופן ויזואלי דרך קובץ ה-HTML הבא:

PROJECT_SPEC_FLOW_SIMULATOR.html בתצוגה ויזואלית

דוגמאות שאלות שה-Agent יודע לענות

  1. מה התחזית בחיפה להיום?

  2. מה מזג האוויר בבית שמש היום?

  3. Are there active weather alerts in CA?

  4. What is the forecast for New York City?

זרימת עבודה תמציתית

  1. המשתמש שואל שאלה בטרמינל.

  2. ה-Host שולח למודל את השאלה + רשימת tools.

  3. המודל מפעיל tools לפי הצורך (open -> enter -> select -> extract).

  4. תוצאות הכלים חוזרות למודל.

  5. המודל מחזיר תשובה סופית למשתמש.

הערות חשובות

  1. אין להעלות את קובץ .env ל-Git.

  2. הקובץ .env.example כולל רק תבנית ללא מפתחות.

  3. תיתכנה תלות ברשת ובטעינת האתר בזמן אמת.

Available Tools

4 tools
enter_weather_forecast_city_israelA

מזין עיר לשדה החיפוש באתר התחזית הישראלי. מומלץ להפעיל אחרי open_weather_forecast_israel.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and it clearly states the primary behavior of entering a city into the search field. It does not mention potential side effects, but the action is simple and non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, using two short sentences with no unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient for a simple tool with one parameter, and the recommended ordering relative to open_weather_forecast_israel adds useful context. It could mention expected page state, but that is not essential.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only provides the parameter name and type (city, string), and the description does not elaborate on it. However, the parameter is self-explanatory from its name and title.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (enters a city into the search field) and the target (the Israeli forecast site), distinguishing it from sibling tools like open_weather_forecast_israel and extract_weather_forecast_content_israel.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly recommends running this tool after open_weather_forecast_israel, providing clear temporal guidance on when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_weather_forecast_content_israelB

מחלץ תוכן תחזית מהעמוד ומחזיר טקסט נקי ל-LLM. להפעיל אחרי בחירת עיר.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it extracts and returns text, implying a read-only operation, but does not disclose any side effects, permissions, or error conditions. For a tool with zero annotation coverage, this is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the core action and output. Every word earns its place, and there is no redundant or vague filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 0-parameter tool with an output schema, the description is functional but minimal. It includes a useful workflow context ('after city selection') but does not elaborate on what 'clean text' entails or potential failure cases. The output schema likely covers return format, so it is adequate but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema description coverage is 100% (empty schema covers all). Per guidelines, the baseline is 4 for 0 params; the description adds no parameter information, which is appropriate since there are none to explain.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb (extracts) and resource (forecast content from the page) and its output (clean text for LLM). It distinguishes itself from siblings by the action 'extract' versus 'open', 'enter', 'select', though it does not explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a clear precondition ('after city selection') but does not explicitly compare with sibling tools or state when not to use it. The usage context is implied rather than explicit, offering no exclusions or alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open_weather_forecast_israelA

פותח דפדפן ומנווט לעמוד התחזית בישראל. זה כלי פתיחה מומלץ לפני שאר הכלים.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without any annotations, the description fully discloses the tool's behavior—opening a browser and navigating to a specific page. It does not hide any side effects, though it could mention potential delays or the need for network access, but that is minor.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and to the point, consisting of two short sentences with no unnecessary detail. It conveys the core function and recommendation efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has no parameters and no output schema, the description provides all necessary context: what it does and its role relative to sibling tools. The statement that it is a recommended opener completes the operational picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so the baseline of 4 applies. The description is consistent with this and adds no ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool opens a browser and navigates to the weather forecast page for Israel, using specific action verbs and a defined target. It also distinguishes itself from sibling tools by positioning itself as a recommended opening step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use this tool before the others, giving clear guidance on when it should be invoked. The recommendation to open with this tool provides a direct usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

select_weather_forecast_city_israelA

בוחר את העיר הראשונה מרשימת ההצעות. אם צריך משתמש גם במקלדת (חץ למטה + Enter).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It transparently says it selects the first city, which is a benign action, but it does not mention any potential side effects or prerequisites. Adequate but not fully explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two short sentences. It conveys the core action and an optional usage tip without any fluff, making it efficiently structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is complete for a simple selection action. It explains what it does and how to interact via keyboard, which is sufficient. It could mention the context of the suggestions list, but the sibling tools imply the workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so the schema already fully covers this aspect. The description does not add unnecessary detail about parameters, which is appropriate given their absence.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that it selects the first city from a list of suggestions, which is specific and distinguishes it from other weather tools. However, it does not explicitly name sibling tools, but the action is clear enough.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lacks guidance on when to use this tool versus alternatives like entering a city or opening weather details. It only mentions keyboard usage, which is about how to interact, not when to choose this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedenter_weather_forecast_city_israel
    • First observedextract_weather_forecast_content_israel
    • First observedopen_weather_forecast_israel
    • First observedselect_weather_forecast_city_israel

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a distinct action (open, enter, select, extract) and target, reducing ambiguity. However, the repetitive naming with 'weather_forecast_israel' might cause minor confusion in a larger set.

Naming Consistency3/5

The naming follows a consistent pattern of verb_weather_forecast_target_israel, but the verbs vary (open, enter, select, extract) without a uniform action prefix. The pattern is recognizable but not fully standardized.

Tool Count5/5

Four tools is well-scoped for a sequential web scraping workflow, providing just enough steps without redundancy. This is an ideal size for the intended purpose.

Completeness4/5

The tools cover the essential steps for retrieving weather data (open site, search city, select result, extract content). Minor gaps like error handling or direct URL navigation are not included, but the core workflow is complete.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers