find_code_examples
Search fenced code blocks in documentation by natural language query, with optional language and document path filters. Returns matched block details for precise code retrieval.
Instructions
Search fenced code blocks across the indexed docs by BM25 over the block content. Returns one row per block with {block_id, section_id, doc_path, title, lang, byte_start, byte_end, snippet, _score}. Optional lang filter (e.g. 'python', 'bash') and doc_path/path_glob scope filters (applied before scoring, same contract as search_sections). Use after index_local; requires INDEX_VERSION>=3.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | jdocmunch repo identifier | |
| query | Yes | Free-form code-content query | |
| lang | No | Optional case-insensitive language filter | |
| doc_path | No | Optional exact-document scope: only blocks in the section with this doc_path | |
| path_glob | No | Optional fnmatch glob (e.g. 'docs/api/**') scoping blocks to matching document paths | |
| max_results | No |