knowerage_create_or_update_doc
Create or update a markdown analysis document for source code with YAML frontmatter including source path and covered line ranges. Use to persist code analysis results and maintain a consistent registry.
Instructions
PRIMARY tool for persisting legacy/source code analysis: create or update an analysis markdown file under knowerage/analysis/ with YAML frontmatter (source path, covered line ranges, dates). Use this whenever the user asks to analyze, document, or explain a source file and Knowerage is in the tool list—do not use generic file-write tools alone for knowerage analysis paths, or the registry will not stay consistent. Follow with knowerage_reconcile_record on the same analysis_path.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"analysis_path": "<analysis_path>",
"source_path": "<source_path>",
"covered_lines": "<covered_lines>",
"content": "<content>"
},
"name": "knowerage_create_or_update_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analysis_path | Yes | Relative path for the analysis markdown file | |
| content | Yes | Markdown body content for the analysis | |
| covered_lines | Yes | Array of [start, end] line ranges | |
| source_path | Yes | Relative path to the source file being analyzed |