get_history
View history. Who changed a tree or one of its concepts, when, and why: its commits, newest first, read from Git (changes made in OKForest and directly in Git alike), a concept’s from before it was renamed or moved too. With commit, what that commit changed instead: each file’s frontmatter field by field, and its lines. With concept and blame, who last changed each of the concept’s frontmatter fields and lines, and why (e.g. who set its status). Read-only.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
tree |
string | No | The tree’s slug, as list_trees gives it (not its name). Required unless the Forest has one tree, or concept names it. |
concept |
string | No | A concept ID, its tree first (company:customers/acme-corp): that concept’s history, rather than the whole tree’s. |
commit |
string | No | A commit’s full SHA, as this tool lists them: what that commit changed. |
page |
integer, 1–9007199254740991 | No | Which page of commits, 20 to a page; the first by default. |
blame |
boolean | No | With concept: the commit that last changed each of its frontmatter fields and lines, rather than its commits. |
Returns
Section titled “Returns”One JSON object (see All tools):
| Field | Type | Always | Description |
|---|---|---|---|
tree |
Tree reference | Yes | The tree, and the commit it was read at: history ends there. |
path |
string | No | The concept’s file, when concept was given. |
commits |
list of Commit | No | The commits, newest first; absent when commit was given. |
more |
boolean | No | Whether there are older commits: ask for the next page. |
commit |
object | No | What the commit changed in the tree, when commit was given. |
commit.sha |
string | Yes | The commit’s full SHA. |
commit.parents |
list of strings | Yes | The commits it follows: its changes are from the first. |
commit.message |
string | Yes | Its message. |
commit.author |
string | Yes | Who made it, by their name in Git. |
commit.date |
string | Yes | When they made it. |
commit.url |
string | Yes | Its page in OKForest. |
commit.more |
boolean | Yes | Whether GitHub listed only some of the files it changed. |
commit.files |
list of objects | Yes | The files it changed in the tree. |
commit.files[].path |
string | Yes | The file’s path in the tree. |
commit.files[].status |
added | removed | modified | renamed | copied | changed | unchanged |
Yes | What the commit did to it. |
commit.files[].previousPath |
string | No | Its path before, when it was renamed or copied. |
commit.files[].fields |
list of objects | No | A markdown file’s frontmatter changes, field by field. |
commit.files[].fields[].name |
string | Yes | The frontmatter key. |
commit.files[].fields[].before |
string | No | Its value before; absent when it was added. |
commit.files[].fields[].after |
string | No | Its value after; absent when it was removed. |
commit.files[].lines |
list of strings | No | Its text’s changes (a markdown file’s body), each line marked + (added), - (removed), or a space (unchanged), with long unchanged runs left out; absent for a binary file, one over 1 MB, or one past a commit’s first 20. |
blame |
object | No | Who last changed the concept’s fields and lines, when blame was given. |
blame.commits |
list of Commit | Yes | The commits that last changed its lines, newest first. |
blame.fields |
list of objects | No | Each frontmatter field, as written, and the commit that last changed it. |
blame.fields[].name |
string | Yes | The frontmatter field. |
blame.fields[].sha |
string | Yes | The commit that last changed it, among commits. |
blame.lines |
list of objects | No | The file’s lines, in runs that one commit last changed; absent for a file over 1 MB. |
blame.lines[].sha |
string | Yes | The commit that last changed them, among commits. |
blame.lines[].start |
number | Yes | The first one’s line number in the file, from 1. |
blame.lines[].lines |
list of strings | Yes | The lines, as written. |
Example
Section titled “Example”Asked “Who changed Acme Corp, and why?”, an assistant might call get_history with:
{ "concept": "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": "abc1234abc1234abc1234abc1234abc1234abc12", "url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/" }, "path": "customers/acme-corp.md", "commits": [ { "sha": "abc1234abc1234abc1234abc1234abc1234abc12", "message": "Tag Acme Corp as retail\n\nIt buys the retail analytics plan.", "author": "Jane Doe", "date": "2026-09-20T00:00:00Z", "url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/-/commit/abc1234abc1234abc1234abc1234abc1234abc12" }, { "sha": "1111111111111111111111111111111111111111", "message": "Start the tree", "author": "Jane Doe", "date": "2026-09-01T00:00:00Z", "url": "https://app.okforest.ai/@/3f2b8c1e-9a4d-4c7b-8e2f-6d1a0b5c9e7f/company/-/commit/1111111111111111111111111111111111111111" } ], "more": false}