get_cedar_template
Retrieve a CEDAR metadata template as compact YAML, with optional expansion of ontology branches to list allowed labels or terms.
Instructions
Get a template from the CEDAR repository.
The template is fetched in CEDAR's compact YAML rendering, which is a far cheaper way to read a template than the JSON-LD form: it leaves out provenance and other bookkeeping keys, so it costs fewer tokens.
A field restricted to an ontology branch reports that branch rather than the values it allows. Use expand_branches to list those values, bearing in mind that each branch costs one BioPortal lookup and a template can easily have twenty of them.
Args: template_id: The template ID or full URL from CEDAR repository (e.g., "https://repo.metadatacenter.org/templates/e019284e-48d1-4494-bc83-ddefd28dfbac") expand_branches: How much of each ontology branch to list under permissible_values (default: "none"): "none" reports the branch itself and does no lookups; "labels" lists the allowed labels, which is enough to read a template but carries no IRIs; "terms" lists each label with its IRI, which is what filling in a controlled term field needs, at roughly 1.7x the size of "labels"
Returns: Template data from CEDAR, cleaned and transformed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes | ||
| expand_branches | No | none |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||