query_codebase
Find Swift code by natural-language queries combined with structural graph search. Returns ranked nodes from the codebase graph based on semantic and relationship relevance.
Instructions
Hybrid semantic + structural query over the Swift codebase graph.
:param q: Natural-language query, e.g. "request retry policy". :param k: Number of semantic seed nodes (default 8). :param hop: Graph expansion hops (default 1). :param rels: Comma-separated edge types to follow. :param max_nodes: Maximum nodes to return (default 25). :param min_score: Minimum semantic score for seed inclusion in [0, 1]. :param max_per_module: Maximum nodes per module (default 3; 0 disables). :param rerank_mode: 'hybrid' (default), 'semantic', or 'legacy'. :param rerank_semantic_weight: Semantic weight for hybrid mode (default 0.7). :param rerank_lexical_weight: Lexical weight for hybrid mode (default 0.3). :param format: 'json' (default) or 'markdown'. :return: JSON string or Markdown table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| q | Yes | ||
| hop | No | ||
| rels | No | CONTAINS,CALLS,IMPORTS,INHERITS,CONFORMS,EXTENDS | |
| format | No | json | |
| max_nodes | No | ||
| min_score | No | ||
| rerank_mode | No | hybrid | |
| max_per_module | No | ||
| rerank_lexical_weight | No | ||
| rerank_semantic_weight | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |