AI-driven hedging engine for treasury markets with analytics pipeline, FX/commodity/equity streaming, money market quotes, VNIBOR fixing, and Gemini Vision-based quote extraction
Treasury Analytics Terminal has 21 tools with inconsistent quality. Naming is generally verb-forward (run_pipeline, save_batch, csv_search) but some tools lack clarity (serve_json, ai_scan). Descriptions vary widely: some are detailed (run_pipeline: 150+ chars with body format), others are minimal (health: 20 chars). Critical gaps: NO input schemas visible in source code for ANY tool, only parameter names and types are listed in the evaluation summary, not actual JSON Schema definitions. Parameters lack formal type constraints (enums, patterns, ranges). Error handling is absent, no recovery guidance, no categorization of retryable vs fatal errors. Output schemas are undocumented. The server exposes API keys as parameters (ai_scan requires 'api_key' param), violating secret-injection pattern. No pagination support visible despite tools returning lists (json_list, counterparties, csv_search). Tool composition is reasonable (separate read/write operations) but lacks chaining metadata (e.g., csv_search returns no IDs for follow-up queries).
Gemini Vision: extract structured quotes from image. Body: { "image_base64": "...", "market": "MM|FX|VNIBOR", "api_key": "AIxxx...", "image_mime": "image/jpeg" (optional) }
Get yfinance commodity prices with deltas (Gold, Silver, WTI Oil, Brent, Natural Gas)
List all counterparties in the quotes database
List all dates with available data in quotes.csv
Multi-filter search on quotes.csv. Body: { "date": "YYYY-MM-DD", "market": "MM|FX", "tenor": "ON", "counterparty": "BANK_NAME" } (all optional)
Get VNIBOR + MM + Swap summary + CP intraday dashboard data
Get yfinance equity index prices with deltas (VNINDEX, VN30, S&P 500, NASDAQ, Nikkei 225, Hang Seng, FTSE 100)
No JSON Schema definitions visible in source code. All 21 tools lack formal input schemas with type constraints, enums, patterns, and ranges. Parameter descriptions exist but are not machine-parseable constraints.
API keys exposed as tool parameters. ai_scan requires 'api_key' parameter, violating secret-injection pattern. Credentials in parameters leak into agent logs and traces.
No error handling or recovery guidance. Tools lack actionable error messages, error categorization (retryable vs fatal), or suggestions for next steps. LLMs cannot self-correct on failures.
Output schemas undocumented. No tool describes what fields it returns, data types, or structure. LLMs cannot plan downstream calls or extract required chaining IDs (e.g., csv_search returns no IDs for follow-up queries).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 43 | <=2025-11-25 | v2 |
Get yfinance intraday FX rates with deltas (USD/VND, EUR/USD, GBP/USD, USD/JPY, USD/CNY, EUR/VND)
Health check endpoint
List available JSON files in data_json/ directory
Query MM quotes by date, tenor, and counterparty
Get RSS news feed (cached 10 minutes)
Force-refresh news cache
Get last run status of the analytics pipeline
Trigger full or selective analytics pipeline. Body (JSON, all optional): { "jobs": "all" | ["fx","bond","mm","shortterm"], "skip_ingest": false }. Runs in a background daemon thread; returns 202 immediately.
Save interbank MM/FX quotes. Body: { "date": "YYYY-MM-DD", "counterparty": "BANK_NAME", "market": "MM|FX", "source": "manual", "quotes": [{"tenor": "ON", "bid": 3.5, "ask": 3.75}, ...] }
Save VNIBOR fixing rates. Body: { "date": "YYYY-MM-DD", "rates": { "ON": 3.5, "1W": 3.8, ... } }
Serve any JSON file from data_json/ directory by filename
Query FX swap quotes by date and tenor
Get current VNDUSD rate (manual override if set, else yfinance)
Set manual VNDUSD override. Body: { "rate": 25000 } or { "rate": null } to clear
List tools lack pagination. json_list, counterparties, csv_search, and news return unbounded results with no limit, offset, or cursor parameters. Large result sets blow context windows.