1---2name: hmdb-skill3description: Submit compact HMDB search requests for metabolites, proteins, diseases, and pathways. Use when a user wants concise HMDB summaries4metadata:5 source: https://skillmd.com/skills/stanfish06/hmdb-skill6---78## Operating rules9- hmdb.ca publishes no JSON API and sits behind a Cloudflare interactive challenge: every path, including `/`, `/downloads`, `/metabolites/<id>` and `/unearth/q`, answers a scripted request with HTTP 403 and `cf-mitigated: challenge`. `scripts/rest_request.py` cannot retrieve HMDB content. Say so rather than reporting an empty result.10- To act on an HMDB accession, map it to a database that does serve an API: UniChem source 18 is HMDB, and `POST https://www.ebi.ac.uk/unichem/api/v1/compounds` with `{"type":"sourceID","compound":"<HMDB id>","sourceID":18}` returns the ChEBI, ChEMBL, PubChem and DrugBank identifiers for the same structure. Hand those to `chebi-skill`, `chembl-skill`, or `pubchem-pug-skill`.11- Bulk HMDB XML is distributed from https://hmdb.ca/downloads, which a person can fetch in a browser; there is no scripted route to it.12- Re-run requests in long conversations instead of relying on older tool output.13- Treat displayed `...` in tool previews as UI truncation, not literal request content.1415## Execution behavior16- Return concise markdown summaries from the script JSON by default.17- If the user needs the full payload, set `save_raw=true` and report the saved file path.1819## Input20- Read one JSON object from stdin.21- Required fields: `base_url`, `path`22- Optional fields: `method`, `params`, `headers`, `json_body`, `form_body`, `record_path`, `response_format`, `max_items`, `max_depth`, `timeout_sec`, `save_raw`, `raw_output_path`23- Identifier cross-reference pattern:24 - `{"base_url":"https://www.ebi.ac.uk/unichem/api/v1","path":"compounds","method":"POST","json_body":{"type":"sourceID","compound":"HMDB0000259","sourceID":18},"record_path":"compounds.0.sources","max_items":10}`2526## Output27- Success returns `ok`, `source`, `path`, `method`, `status_code`, `warnings`, and either compact `records` or a compact `summary`.28- Use `raw_output_path` when `save_raw=true`.29- Failure returns `ok=false` with `error.code` and `error.message`.3031## Execution32```bash33echo '{"base_url":"https://www.ebi.ac.uk/unichem/api/v1","path":"compounds","method":"POST","json_body":{"type":"sourceID","compound":"HMDB0000259","sourceID":18},"record_path":"compounds.0.sources","max_items":10}' | python scripts/rest_request.py34```3536## References37- No additional runtime references are required; keep the import package limited to this file and `scripts/rest_request.py`.