A multi-day learning project demonstrating LINE bot integration with LLM agents, including MCP (Model Context Protocol) server implementations with weather and time tools
The server defines 3 tools (though 2 are duplicates: get_weather_forecast appears twice). Tool naming follows the verb_noun convention (get_time, get_weather_forecast), which is good. All tools have descriptions that are non-empty and reasonably detailed (10-120 chars, within the 10-1024 target). Input schemas are explicitly defined using Pydantic BaseModel classes with proper type declarations and parameter descriptions. However, there are significant gaps: (1) output schemas are not documented anywhere, callers don't know what structure to expect; (2) parameter descriptions lack constraints (e.g., the 'date' param has no format validation guidance; 'query' param lacks enum constraint despite expecting only 4 values); (3) error handling is minimal and non-actionable (returns bare error dicts with no recovery guidance); (4) tool composition is weak, weather_tool has external dependencies (geopy, requests) and no rate limiting or timeout configuration visible. The server is functional but falls short of production readiness.
Returns the date or datetime for 'today', 'now', 'yesterday', or 'tomorrow'.
Retrieves the weather using Open-Meteo API for a given location (city) and a date (yyyy-mm-dd).
Retrieves the weather using Open-Meteo API for a given location (city) and a date (yyyy-mm-dd).
Output schemas are not documented. Callers have no specification of what fields to expect in the response. get_time returns a string; get_weather_forecast returns a dict mapping timestamps to temperatures, but this is not formally documented.
Duplicate tool definition: get_weather_forecast is registered twice in the codebase (day_1/3_LINE_with_Agent and day_2/1_MCP/05_LINE_with_Agent_MCP). This creates confusion and suggests incomplete refactoring.
Parameter 'query' in get_time should declare valid values as an enum constraint (today|now|yesterday|tomorrow) rather than relying on the description. Current implementation accepts free-form strings and returns generic error messages.
Parameter 'date' in get_weather_forecast has no format constraint documentation. Description says 'yyyy-mm-dd' but provides no validation rules or error guidance if the format is wrong.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 57 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 51 | - | v1 |
Error handling is non-actionable. Tools return bare error dicts like {"error": "Location not found"} with no guidance on recovery steps. Errors should explain what the LLM should do next (e.g., 'Location not found. Try searching with a city and state.').
External API dependencies (geopy, Open-Meteo) have no visible timeout or rate-limit configuration. An agent stuck waiting on a hung API call blocks execution.
Tool descriptions are too brief to be LLM-optimal. get_time (113 chars) and get_weather_forecast (127 chars) lack context on WHEN to use them vs similar alternatives, and what users should expect.