Get code snippet
get_code_snippetRetrieve bounded source code by exact byte offsets, including line and column positions, for safe repository context extraction without execution.
Instructions
Read-only bounded source retrieval by exact UTF-8 byte offsets, with line/column positions and no code execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | No | Project root | . |
| file_path | Yes | File path relative to directory | |
| max_bytes | No | Maximum returned UTF-8 bytes | |
| end_offset | No | Exclusive UTF-8 byte offset | |
| start_offset | No | Inclusive UTF-8 byte offset | |
| redact_secrets | No | Redact common secrets; offsets remain those of the original file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | Yes | ||
| error | No | ||
| message | No | ||
| success | Yes | ||
| schema_version | Yes |