A Next.js application demonstrating Mastra AI agents with a weather tool that fetches current weather data for specified locations using Open-Meteo APIs
Single-tool example project with basic but functional definition. The 'get-weather' tool has a clear name, adequate description, and properly typed input/output schemas. Input parameters have descriptions and types, which meets baseline expectations. However, output schema lacks per-field descriptions, error handling guidance is minimal, and the tool composition is trivial (single-tool example). Descriptions are concise and appropriate for a weather utility but not optimized for complex agent reasoning. No multi-tool coordination patterns are evident, expected in an example, but limits practical production applicability.
Get current weather for a location
Output schema fields lack individual descriptions. The outputSchema in src/mastra/tools/index.ts declares z.object with fields (temperature, feelsLike, humidity, windSpeed, windGust, conditions, location) but provides no per-field descriptions for LLM reasoning.
Error handling lacks recovery guidance. The tool throws 'Location not found' but does not suggest alternatives (e.g., 'Try a larger city name' or list nearby matches). LLMs cannot self-correct without explicit guidance.
Input parameter 'location' description is minimal ('City name'). Does not specify format, length limits, or whether partial matches work. Lacks discovery hint like 'Use English city names for best accuracy.'
No rate-limiting or timeout specification documented. External API calls to geocoding-api.open-meteo.com and api.open-meteo.com may hang without explicit timeout guards, risking agent deadlock.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 53 | 2025-06-18+ | v2 |
| 2026-03-09 | F | 43 | - | v1 |