Get Carve source blocks
carve_get_blockExtract exact source text for nodes matching a selector or a heading's full section, returning UTF-8 byte offsets and a source sha256 for verification.
Instructions
Return the exact source text of the nodes a selector matches, or a heading's section, with UTF-8 byte offsets and the source sha256. No AST unless includeAst.
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": {
"source": "<source>",
"selector": "<selector>"
},
"name": "carve_get_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | section: a heading through its content, up to the next heading of the same or higher level. | node |
| source | Yes | Document source (maximum 1000000 UTF-8 bytes) | |
| selector | Yes | ||
| includeAst | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blocks | Yes | ||
| sha256 | Yes | ||
| truncated | Yes | ||
| matchCount | Yes | ||
| sourceBytes | Yes |