Fetch Meta From Kb
Fetch recent `journals` rows directly from PostgreSQL and return a JSON array containing `doi`, `…
by tiangong-ai · MIT
The skill
Fetch recent `journals` rows directly from PostgreSQL and return a JSON array containing `doi`, `title`, `abstract`, and `date` (filtered by rolling `DAYS` on `created_at`). Use when users need raw paper payloads for downstream processing without LLM filtering or hotspot report generation.
Fetch Meta from KB
Workflow
- Read DB env vars from
.envor process env:KB_DB_HOST,KB_DB_PORT,KB_DB_NAME,KB_DB_USER,KB_DB_PASSWORD. - Query
journalswherecreated_at >= now_utc - DAYS, ordered bycreated_at DESC, selecting onlydoi,title,abstract,date. - Return/write JSON array records with exactly these fields:
doi,title,abstract,date.
Script
Run:
cd fetch-meta-from-kb
python3 scripts/fetch_meta_from_kb.py --days 7 --output selected-abstract.json
Env example:
KB_DB_HOST=<HOST>
KB_DB_PORT=5432
KB_DB_NAME=<DATABASE>
KB_DB_USER=<USER>
KB_DB_PASSWORD=<PASSWORD>
Output Rules
- Return UTF-8 JSON.
- Keep each item as:
doi,title,abstract,date. - Do not output DB credentials.
Use this skill
Connect your agent to the Skill Store MCP server and ask for it by ref: tiangong-ai/fetch-meta-from-kb-2418606260.
Details
- Publisher
- tiangong-ai
- Category
- Data & Analytics › Databases & SQL
- License
- MIT
- Updated
- 2026-09-14
References
More from tiangong-ai
- Academic Paper Download Fetch and atomically save structurally and identity-verified academic-paper PDFs from legal open-…
- Ai Tech Fulltext Fetch Fetch and persist article full text for RSS entries already stored in SQLite by ai-tech-rss-fetch.
- Ai Tech Rss Fetch Subscribe to AI and tech RSS feeds and persist normalized metadata into SQLite using mature Pytho…
- Ai Tech Summary Retrieve time-windowed RSS evidence from SQLite and let the agent produce final summaries using R…