One function's score across runs
get_function_historyRetrieve a function's complexity, coverage, and crap scores across runs, oldest first, to determine if it's improving, decaying, or regrown. Optionally include git commit history and test contexts.
Instructions
Returns one function's ccn, coverage, crap and flag per run, oldest first, plus its ratchet mark. Use it to tell improving from decaying or regrown, and get_function_brief to start an edit. history true spawns git log -L capped at 10 commits, and tests true is null unless the lane recorded contexts. name matches the long names any run scored in path, so a fragment returns one entry per match, and a bare twin name picks the worst twin. A same-line twin's history skips runs stored before same-line positions. repo may be any directory under the checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | the long_name get_next_item printed (classify( score , late )), the bare identifier (classify, or route for a Rust `route cmd : & Cmd`), a fragment of either, the line the function starts on, or a handle such as NAME#2 for a twin or (anonymous)#2; exact match first | |
| path | Yes | source file, repo-relative or absolute inside the repo; a backslash separates folders on Windows only | |
| repo | No | path to the scored repo's root (default: the repo the server was started in); a leading ~ is the home directory | |
| tests | No | also list the tests covering this function (coverage.py contexts), as tests | |
| history | No | also list the commits that touched this function (git log -L), as commits |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | the name argument as given | |
| path | No | the file asked about | |
| schema | No | payload schema version, 1 | |
| functions | No | the functions name resolved to, in store order | |
| truncated | No | present only when the whole answer was longer than one tool result the server sends (7,500 characters): each list, string or object field it cut, at any depth, keeps its start, and full is the CLI command that prints the whole answer |