get_links
List a concept’s links. The concepts a concept links to, the concepts that link to it (backlinks), and the external URLs it cites. Read-only.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Concept ID, its tree first: company:product/okforest-product-brief. In a Forest of one tree, the tree may be left out. |
Returns
Section titled “Returns”One JSON object (see All tools):
| Field | Type | Always | Description |
|---|---|---|---|
tree |
Tree reference | Yes | The tree it’s in, and the commit it was read at. |
id |
string | Yes | The concept’s ID. |
links |
list of Concept link | Yes | The concepts it links to. |
backlinks |
list of Concept link | Yes | The concepts that link to it. |
external |
list of strings | Yes | The external URLs it links to or cites. |
Example
Section titled “Example”Asked “What is Acme Corp connected to?”, an assistant might call get_links with:
{ "id": "company:customers/acme-corp"}On OKForest’s test Forest (Acme’s made-up company knowledge), it returns:
{ "tree": { "slug": "company", "repo": "acme/acme-okf", "commit": "abc1234abc1234abc1234abc1234abc1234abc1", "url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/" }, "id": "company:customers/acme-corp", "links": [ { "id": "company:competitors/rival-co", "title": "Rival Co", "tree": "company", "url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/competitors/rival-co" } ], "backlinks": [], "external": [ "https://acme.example" ]}