Записывает, как код на самом деле исполнялся: вызовы, доводы, результаты, исключения, длительности
Эта страница собрана прогоном, а не написана. Её печатает scripts/probe/render_reference.py из файла docs/mcp-tools.json, который снят живым разговором с сервером: каждое средство здесь сервер объявил сам, и на каждое сделан настоящий вызов, ответ на который приведён ниже дословно.
Пересобрать:
scripts/probe/build-reference.sh
| сервер | ouroboros-logger версия 1.27.2 |
| правила разговора | 2025-11-25 |
| чем запускается | ouroboros-mcp (pyproject [project.scripts]) |
| средств объявлено | 17 |
| снято | 2026-08-29T08:29:50 |
Средств, объявленных но не вызванных при съёмке, нет: настоящий ответ есть на каждое.
В путях примеров <work> — каталог, в котором шла съёмка, <python> — исполняемый файл Python, которым звали. Длинные строки и списки обрезаны, обрезка помечена в самом значении.
Ouroboros-Logger: guaranteed function-level logging instrumentation for code.
The loop is instrument -> run -> observe:
1. instrument: wrap_code_snippet (in memory), wrap_file (whole file in place),
or wrap_functions (only named functions — for hot/kernel paths). Or work in
a sandbox: create_project, then write_file (wrap-on-save), execute, finish.
2. run: execute the instrumented code (execute, or run it yourself); every
wrapped call appends `in`/`out` JSONL records to a debug.info trace.
3. observe: read_trace (structural query + pagination) and trace_stats
(per-function counts + real durations). min_duration finds slow calls;
in_flight surfaces hung/crashed ones.
Choosing WHAT to instrument in a large C/C++ tree — six clangd/clang-tidy tools,
listed here because a tool absent from these instructions does not get chosen:
symbol_search (find a name across the tree), document_symbols (what one file
defines), references (who uses it), call_hierarchy (who calls whom, transitively),
describe_symbol (where it is defined, with what signature), lint_file (clang-tidy
findings). Use them BEFORE wrap_functions to pick the functions worth wrapping,
instead of wrapping a whole hot file. They need `clangd` and `clang-tidy` on PATH
and, for anything cross-file, a compile_commands.json; without those they return
{ok: false} explaining what is missing, so it is safe to try one and read the answer.
Filesystem effects: wrap_file/wrap_functions overwrite the target file in place;
write_file/finish mutate the sandbox tree; execute runs arbitrary commands. The
read_* / list_files / trace / clangd tools never write. See SPEC.md for the trace
schema.
wrap_code_snippet — Wrap code snippetWrap a raw code string with function-level logging instrumentation.
да: только читает; нет: трогает что-то за пределами своих доводов
Доводы
| довод | тип | обязателен | по умолчанию |
|---|---|---|---|
code |
string | да | — |
language |
string | да | — |
wrap_file — Instrument file in placeInstrument a source file in place; returns success/failure metrics.
Set minimal=True (C only) for the stackless depth-only probe on every
function — wrap a whole mechanism file to capture its full runtime call tree.
да: перезаписывает то, что было, повторный вызов даёт тот же итог; нет: только читает, трогает что-то за пределами своих доводов
Доводы
| довод | тип | обязателен | по умолчанию |
|---|---|---|---|
path |
string | да | — |
minimal |
boolean | нет | false |