Search
search
SearchTool — semantic symbol search.
SearchTool
Bases: AXMTool
Search symbols by name, return type, kind, or base class.
Registered as ast_search via axm.tools entry point.
Source code in packages/axm-ast/src/axm_ast/tools/search.py
| Python | |
|---|---|
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
name
property
Return tool name for registry lookup.
execute(*, path='.', name=None, returns=None, kind=None, inherits=None, **kwargs)
Search symbols across a package.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to package directory. |
'.'
|
name
|
str | None
|
Filter by symbol name (substring match). |
None
|
returns
|
str | None
|
Filter by return type. |
None
|
kind
|
str | None
|
Filter by kind (function, method, property, classmethod, staticmethod, abstract, class, variable). |
None
|
inherits
|
str | None
|
Filter by base class name. |
None
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with matching symbols. |
Source code in packages/axm-ast/src/axm_ast/tools/search.py
find_suggestions(pkg, name, *, kind=None)
Find fuzzy suggestions for a symbol name query.
Passes pkg.root to _collect_module_candidates so module
names are resolved even when the parser leaves mod.name unset.
Source code in packages/axm-ast/src/axm_ast/tools/search.py
format_symbol(sym, module_name)
Format an AST symbol into a serialized dict entry.
Returns a dict with keys name, module, and optionally
signature, return_type, kind (function/method/property/
classmethod/staticmethod/abstract/class/variable), annotation,
and value_repr.