mcpField
F
fetch-meta-from-kb

fetch-meta-from-kb

github.com/tiangong-aiData & databases1137 installsUpdated 1w ago
Repository

About fetch-meta-from-kb

This skill retrieves recent journal metadata from a configured database and writes records as JSON with only DOI, title, abstract, and date. It is intended for workflows that need a date-bounded selection of journal entries.

Key features

  1. 01Filter journal records by age in days
  2. 02Sort by creation time, newest first
  3. 03Read database settings from environment variables
  4. 04Write UTF-8 JSON with fixed fields

Use cases

  1. 01Export metadata from the past week
  2. 02Prepare abstract records for a later workflow

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tiangong-ai/agent-skills --skill fetch-meta-from-kb

After installing, type/fetch-meta-from-kbin Claude Code to confirm it loaded.

Details

From the project README

Fetch Meta from KB

Workflow

  1. Read DB env vars from .env or process env: KB_DB_HOST, KB_DB_PORT, KB_DB_NAME, KB_DB_USER, KB_DB_PASSWORD.
  2. Query journals where created_at >= now_utc - DAYS, ordered by created_at DESC, selecting only doi, title, abstract, date.
  3. 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.

Comments

Markdown supported