mcpField
F
fetch-abstract-to-kb

fetch-abstract-to-kb

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

About fetch-abstract-to-kb

A skill for retrieving DOI candidates from a database and batch-writing abstracts by DOI. It is intended for journal-record maintenance and updates only rows whose abstract is still empty.

Key features

  1. 01Retrieve qualifying DOI records
  2. 02Set the fetch row limit
  3. 03Batch-write abstracts by DOI
  4. 04Update only empty abstracts

Use cases

  1. 01Find journal records without abstracts
  2. 02Fill in abstracts for multiple DOIs

Install

Copy the command and run it in a terminal.

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

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

Details

From the project README

Fetch Abstract to KB

Core Goal

  • Provide only two DB operations:
    1. Fetch DOI candidates from journals.
    2. Batch update abstract by DOI.

Required Environment

  • KB_DB_HOST
  • KB_DB_PORT
  • KB_DB_NAME
  • KB_DB_USER
  • KB_DB_PASSWORD

Workflow

  1. Fetch DOI list (default 10 rows):
python3 scripts/fetch_abstract_to_kb.py fetch-doi
  1. Optionally override row limit:
python3 scripts/fetch_abstract_to_kb.py fetch-doi --limit 10
  1. Prepare JSON input for batch update (one of the two formats):
[
  {"doi": "10.1000/a", "abstract": "text A"},
  {"doi": "10.1000/b", "abstract": "text B"}
]

or

{
  "10.1000/a": "text A",
  "10.1000/b": "text B"
}
  1. Batch write abstract by DOI:
python3 scripts/fetch_abstract_to_kb.py write-abstracts --input abstracts.json

Query/Write Contract

  • Fetch filter:
    • doi not empty
    • author not empty (fall back to authors when author is unavailable)
    • abstract empty (NULL or blank)
  • Fetch order:
    • ORDER BY created_at DESC NULLS LAST
  • Fetch default limit:
    • 10
  • Write guard:
    • Update only when target row abstract is still empty.

Script

  • scripts/fetch_abstract_to_kb.py

Comments

Markdown supported