#
tokens: 31331/50000 1/367 files (page 15/18)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 15 of 18. Use http://codebase.md/shashankss1205/codegraphcontext?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .github
│   └── workflows
│       ├── e2e-tests.yml
│       ├── post_discord_invite.yml
│       ├── test.yml
│       └── update-contributors.yml
├── .gitignore
├── CONTRIBUTING.md
├── contributors.md
├── docs
│   ├── docs
│   │   ├── architecture.md
│   │   ├── cli.md
│   │   ├── contributing_languages.md
│   │   ├── contributing.md
│   │   ├── cookbook.md
│   │   ├── core.md
│   │   ├── future_work.md
│   │   ├── images
│   │   │   ├── 1.png
│   │   │   ├── 11.png
│   │   │   ├── 12.png
│   │   │   ├── 13.png
│   │   │   ├── 14.png
│   │   │   ├── 16.png
│   │   │   ├── 19.png
│   │   │   ├── 2.png
│   │   │   ├── 20.png
│   │   │   ├── 21.png
│   │   │   ├── 22.png
│   │   │   ├── 23.png
│   │   │   ├── 24.png
│   │   │   ├── 26.png
│   │   │   ├── 28.png
│   │   │   ├── 29.png
│   │   │   ├── 3.png
│   │   │   ├── 30.png
│   │   │   ├── 31.png
│   │   │   ├── 32.png
│   │   │   ├── 33.png
│   │   │   ├── 34.png
│   │   │   ├── 35.png
│   │   │   ├── 36.png
│   │   │   ├── 38.png
│   │   │   ├── 39.png
│   │   │   ├── 4.png
│   │   │   ├── 40.png
│   │   │   ├── 41.png
│   │   │   ├── 42.png
│   │   │   ├── 43.png
│   │   │   ├── 44.png
│   │   │   ├── 5.png
│   │   │   ├── 6.png
│   │   │   ├── 7.png
│   │   │   ├── 8.png
│   │   │   ├── 9.png
│   │   │   ├── Indexing.gif
│   │   │   ├── tool_images
│   │   │   │   ├── 1.png
│   │   │   │   ├── 2.png
│   │   │   │   └── 3.png
│   │   │   └── Usecase.gif
│   │   ├── index.md
│   │   ├── installation.md
│   │   ├── license.md
│   │   ├── server.md
│   │   ├── tools.md
│   │   ├── troubleshooting.md
│   │   └── use_cases.md
│   ├── mkdocs.yml
│   └── site
│       ├── 404.html
│       ├── architecture
│       │   └── index.html
│       ├── assets
│       │   ├── images
│       │   │   └── favicon.png
│       │   ├── javascripts
│       │   │   ├── bundle.f55a23d4.min.js
│       │   │   ├── bundle.f55a23d4.min.js.map
│       │   │   ├── lunr
│       │   │   │   ├── min
│       │   │   │   │   ├── lunr.ar.min.js
│       │   │   │   │   ├── lunr.da.min.js
│       │   │   │   │   ├── lunr.de.min.js
│       │   │   │   │   ├── lunr.du.min.js
│       │   │   │   │   ├── lunr.el.min.js
│       │   │   │   │   ├── lunr.es.min.js
│       │   │   │   │   ├── lunr.fi.min.js
│       │   │   │   │   ├── lunr.fr.min.js
│       │   │   │   │   ├── lunr.he.min.js
│       │   │   │   │   ├── lunr.hi.min.js
│       │   │   │   │   ├── lunr.hu.min.js
│       │   │   │   │   ├── lunr.hy.min.js
│       │   │   │   │   ├── lunr.it.min.js
│       │   │   │   │   ├── lunr.ja.min.js
│       │   │   │   │   ├── lunr.jp.min.js
│       │   │   │   │   ├── lunr.kn.min.js
│       │   │   │   │   ├── lunr.ko.min.js
│       │   │   │   │   ├── lunr.multi.min.js
│       │   │   │   │   ├── lunr.nl.min.js
│       │   │   │   │   ├── lunr.no.min.js
│       │   │   │   │   ├── lunr.pt.min.js
│       │   │   │   │   ├── lunr.ro.min.js
│       │   │   │   │   ├── lunr.ru.min.js
│       │   │   │   │   ├── lunr.sa.min.js
│       │   │   │   │   ├── lunr.stemmer.support.min.js
│       │   │   │   │   ├── lunr.sv.min.js
│       │   │   │   │   ├── lunr.ta.min.js
│       │   │   │   │   ├── lunr.te.min.js
│       │   │   │   │   ├── lunr.th.min.js
│       │   │   │   │   ├── lunr.tr.min.js
│       │   │   │   │   ├── lunr.vi.min.js
│       │   │   │   │   └── lunr.zh.min.js
│       │   │   │   ├── tinyseg.js
│       │   │   │   └── wordcut.js
│       │   │   └── workers
│       │   │       ├── search.973d3a69.min.js
│       │   │       └── search.973d3a69.min.js.map
│       │   └── stylesheets
│       │       ├── main.2a3383ac.min.css
│       │       ├── main.2a3383ac.min.css.map
│       │       ├── palette.06af60db.min.css
│       │       └── palette.06af60db.min.css.map
│       ├── cli
│       │   └── index.html
│       ├── contributing
│       │   └── index.html
│       ├── contributing_languages
│       │   └── index.html
│       ├── cookbook
│       │   └── index.html
│       ├── core
│       │   └── index.html
│       ├── future_work
│       │   └── index.html
│       ├── images
│       │   ├── 1.png
│       │   ├── 11.png
│       │   ├── 12.png
│       │   ├── 13.png
│       │   ├── 14.png
│       │   ├── 16.png
│       │   ├── 19.png
│       │   ├── 2.png
│       │   ├── 20.png
│       │   ├── 21.png
│       │   ├── 22.png
│       │   ├── 23.png
│       │   ├── 24.png
│       │   ├── 26.png
│       │   ├── 28.png
│       │   ├── 29.png
│       │   ├── 3.png
│       │   ├── 30.png
│       │   ├── 31.png
│       │   ├── 32.png
│       │   ├── 33.png
│       │   ├── 34.png
│       │   ├── 35.png
│       │   ├── 36.png
│       │   ├── 38.png
│       │   ├── 39.png
│       │   ├── 4.png
│       │   ├── 40.png
│       │   ├── 41.png
│       │   ├── 42.png
│       │   ├── 43.png
│       │   ├── 44.png
│       │   ├── 5.png
│       │   ├── 6.png
│       │   ├── 7.png
│       │   ├── 8.png
│       │   ├── 9.png
│       │   ├── Indexing.gif
│       │   ├── tool_images
│       │   │   ├── 1.png
│       │   │   ├── 2.png
│       │   │   └── 3.png
│       │   └── Usecase.gif
│       ├── index.html
│       ├── installation
│       │   └── index.html
│       ├── license
│       │   └── index.html
│       ├── search
│       │   └── search_index.json
│       ├── server
│       │   └── index.html
│       ├── sitemap.xml
│       ├── sitemap.xml.gz
│       ├── tools
│       │   └── index.html
│       ├── troubleshooting
│       │   └── index.html
│       └── use_cases
│           └── index.html
├── images
│   ├── 1.png
│   ├── 11.png
│   ├── 12.png
│   ├── 13.png
│   ├── 14.png
│   ├── 16.png
│   ├── 19.png
│   ├── 2.png
│   ├── 20.png
│   ├── 21.png
│   ├── 22.png
│   ├── 23.png
│   ├── 24.png
│   ├── 26.png
│   ├── 28.png
│   ├── 29.png
│   ├── 3.png
│   ├── 30.png
│   ├── 31.png
│   ├── 32.png
│   ├── 33.png
│   ├── 34.png
│   ├── 35.png
│   ├── 36.png
│   ├── 38.png
│   ├── 39.png
│   ├── 4.png
│   ├── 40.png
│   ├── 41.png
│   ├── 42.png
│   ├── 43.png
│   ├── 44.png
│   ├── 5.png
│   ├── 6.png
│   ├── 7.png
│   ├── 8.png
│   ├── 9.png
│   ├── Indexing.gif
│   ├── tool_images
│   │   ├── 1.png
│   │   ├── 2.png
│   │   └── 3.png
│   └── Usecase.gif
├── LICENSE
├── MANIFEST.in
├── organizer
│   ├── CONTRIBUTING_LANGUAGES.md
│   ├── cookbook.md
│   ├── docs.md
│   ├── language_specific_nodes.md
│   ├── Tools_Exploration.md
│   └── troubleshoot.md
├── package-lock.json
├── pyproject.toml
├── README.md
├── scripts
│   ├── generate_lang_contributors.py
│   └── post_install_fix.sh
├── SECURITY.md
├── src
│   └── codegraphcontext
│       ├── __init__.py
│       ├── __main__.py
│       ├── cli
│       │   ├── __init__.py
│       │   ├── cli_helpers.py
│       │   ├── main.py
│       │   ├── setup_macos.py
│       │   └── setup_wizard.py
│       ├── core
│       │   ├── __init__.py
│       │   ├── database.py
│       │   ├── jobs.py
│       │   └── watcher.py
│       ├── prompts.py
│       ├── server.py
│       ├── tools
│       │   ├── __init__.py
│       │   ├── advanced_language_query_tool.py
│       │   ├── code_finder.py
│       │   ├── graph_builder.py
│       │   ├── languages
│       │   │   ├── c.py
│       │   │   ├── cpp.py
│       │   │   ├── go.py
│       │   │   ├── java.py
│       │   │   ├── javascript.py
│       │   │   ├── python.py
│       │   │   ├── ruby.py
│       │   │   ├── rust.py
│       │   │   └── typescript.py
│       │   ├── package_resolver.py
│       │   ├── query_tool_languages
│       │   │   ├── c_toolkit.py
│       │   │   ├── cpp_toolkit.py
│       │   │   ├── go_toolkit.py
│       │   │   ├── java_toolkit.py
│       │   │   ├── javascript_toolkit.py
│       │   │   ├── python_toolkit.py
│       │   │   ├── ruby_toolkit.py
│       │   │   ├── rust_toolkit.py
│       │   │   └── typescript_toolkit.py
│       │   └── system.py
│       └── utils
│           └── debug_log.py
├── tests
│   ├── __init__.py
│   ├── conftest.py
│   ├── sample_project
│   │   ├── advanced_calls.py
│   │   ├── advanced_classes.py
│   │   ├── advanced_classes2.py
│   │   ├── advanced_functions.py
│   │   ├── advanced_imports.py
│   │   ├── async_features.py
│   │   ├── callbacks_decorators.py
│   │   ├── circular1.py
│   │   ├── circular2.py
│   │   ├── class_instantiation.py
│   │   ├── cli_and_dunder.py
│   │   ├── complex_classes.py
│   │   ├── comprehensions_generators.py
│   │   ├── context_managers.py
│   │   ├── control_flow.py
│   │   ├── datatypes.py
│   │   ├── dynamic_dispatch.py
│   │   ├── dynamic_imports.py
│   │   ├── edge_cases
│   │   │   ├── comments_only.py
│   │   │   ├── docstring_only.py
│   │   │   ├── empty.py
│   │   │   ├── hardcoded_secrets.py
│   │   │   ├── long_functions.py
│   │   │   └── syntax_error.py
│   │   ├── function_chains.py
│   │   ├── generators.py
│   │   ├── import_reexports.py
│   │   ├── mapping_calls.py
│   │   ├── module_a.py
│   │   ├── module_b.py
│   │   ├── module_c
│   │   │   ├── __init__.py
│   │   │   ├── submodule1.py
│   │   │   └── submodule2.py
│   │   ├── namespace_pkg
│   │   │   └── ns_module.py
│   │   ├── pattern_matching.py
│   │   └── typing_examples.py
│   ├── sample_project_c
│   │   ├── cgc_sample
│   │   ├── include
│   │   │   ├── config.h
│   │   │   ├── math
│   │   │   │   └── vec.h
│   │   │   ├── module.h
│   │   │   ├── platform.h
│   │   │   └── util.h
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── src
│   │       ├── main.c
│   │       ├── math
│   │       │   └── vec.c
│   │       ├── module.c
│   │       └── util.c
│   ├── sample_project_cpp
│   │   ├── class_features.cpp
│   │   ├── classes.cpp
│   │   ├── control_flow.cpp
│   │   ├── edge_cases.cpp
│   │   ├── enum_struct_union.cpp
│   │   ├── exceptions.cpp
│   │   ├── file_io.cpp
│   │   ├── function_chain.cpp
│   │   ├── function_chain.h
│   │   ├── function_types.cpp
│   │   ├── main.cpp
│   │   ├── main.exe
│   │   ├── namespaces.cpp
│   │   ├── raii_example.cpp
│   │   ├── README.md
│   │   ├── sample_project.exe
│   │   ├── stl_usage.cpp
│   │   ├── templates.cpp
│   │   └── types_variable_assignments.cpp
│   ├── sample_project_go
│   │   ├── advanced_types.go
│   │   ├── basic_functions.go
│   │   ├── embedded_composition.go
│   │   ├── error_handling.go
│   │   ├── generics.go
│   │   ├── go.mod
│   │   ├── goroutines_channels.go
│   │   ├── interfaces.go
│   │   ├── packages_imports.go
│   │   ├── README.md
│   │   ├── structs_methods.go
│   │   └── util
│   │       └── helpers.go
│   ├── sample_project_java
│   │   ├── out
│   │   │   └── com
│   │   │       └── example
│   │   │           └── app
│   │   │               ├── annotations
│   │   │               │   └── Logged.class
│   │   │               ├── Main.class
│   │   │               ├── misc
│   │   │               │   ├── Outer.class
│   │   │               │   └── Outer$Inner.class
│   │   │               ├── model
│   │   │               │   ├── Role.class
│   │   │               │   └── User.class
│   │   │               ├── service
│   │   │               │   ├── AbstractGreeter.class
│   │   │               │   ├── GreetingService.class
│   │   │               │   └── impl
│   │   │               │       └── GreetingServiceImpl.class
│   │   │               └── util
│   │   │                   ├── CollectionUtils.class
│   │   │                   └── IOHelper.class
│   │   ├── README.md
│   │   ├── sources.txt
│   │   └── src
│   │       └── com
│   │           └── example
│   │               └── app
│   │                   ├── annotations
│   │                   │   └── Logged.java
│   │                   ├── Main.java
│   │                   ├── misc
│   │                   │   └── Outer.java
│   │                   ├── model
│   │                   │   ├── Role.java
│   │                   │   └── User.java
│   │                   ├── service
│   │                   │   ├── AbstractGreeter.java
│   │                   │   ├── GreetingService.java
│   │                   │   └── impl
│   │                   │       └── GreetingServiceImpl.java
│   │                   └── util
│   │                       ├── CollectionUtils.java
│   │                       └── IOHelper.java
│   ├── sample_project_javascript
│   │   ├── arrays.js
│   │   ├── asyncAwait.js
│   │   ├── classes.js
│   │   ├── dom.js
│   │   ├── errorHandling.js
│   │   ├── events.js
│   │   ├── exporter.js
│   │   ├── fetchAPI.js
│   │   ├── fixtures
│   │   │   └── js
│   │   │       └── accessors.js
│   │   ├── functions.js
│   │   ├── importer.js
│   │   ├── objects.js
│   │   ├── promises.js
│   │   ├── README.md
│   │   └── variables.js
│   ├── sample_project_misc
│   │   ├── index.html
│   │   ├── README.md
│   │   ├── styles.css
│   │   ├── tables.css
│   │   └── tables.html
│   ├── sample_project_php
│   │   ├── classes_objects.php
│   │   ├── database.php
│   │   ├── edgecases.php
│   │   ├── error_handling.php
│   │   ├── file_handling.php
│   │   ├── functions.php
│   │   ├── generators_iterators.php
│   │   ├── globals_superglobals.php
│   │   ├── Inheritance.php
│   │   ├── interface_traits.php
│   │   └── README.md
│   ├── sample_project_ruby
│   │   ├── class_example.rb
│   │   ├── enumerables.rb
│   │   ├── error_handling.rb
│   │   ├── file_io.rb
│   │   ├── inheritance_example.rb
│   │   ├── main.rb
│   │   ├── metaprogramming.rb
│   │   ├── mixins_example.rb
│   │   ├── module_example.rb
│   │   └── tests
│   │       ├── test_mixins.py
│   │       └── test_sample.rb
│   ├── sample_project_rust
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   └── src
│   │       ├── basic_functions.rs
│   │       ├── concurrency.rs
│   │       ├── error_handling.rs
│   │       ├── generics.rs
│   │       ├── iterators_closures.rs
│   │       ├── lib.rs
│   │       ├── lifetimes_references.rs
│   │       ├── modules.rs
│   │       ├── smart_pointers.rs
│   │       ├── structs_enums.rs
│   │       └── traits.rs
│   ├── sample_project_typescript
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── advanced-types.ts
│   │   │   ├── async-promises.ts
│   │   │   ├── classes-inheritance.ts
│   │   │   ├── decorators-metadata.ts
│   │   │   ├── error-validation.ts
│   │   │   ├── functions-generics.ts
│   │   │   ├── index.ts
│   │   │   ├── modules-namespaces.ts
│   │   │   ├── types-interfaces.ts
│   │   │   └── utilities-helpers.ts
│   │   └── tsconfig.json
│   ├── test_cpp_parser.py
│   ├── test_database_validation.py
│   ├── test_end_to_end.py
│   ├── test_graph_indexing_js.py
│   ├── test_graph_indexing.py
│   ├── test_tree_sitter
│   │   ├── __init__.py
│   │   ├── class_instantiation.py
│   │   ├── complex_classes.py
│   │   └── test_file.py
│   └── test_typescript_parser.py
└── website
    ├── .example.env
    ├── .gitignore
    ├── api
    │   └── pypi.ts
    ├── bun.lockb
    ├── components.json
    ├── eslint.config.js
    ├── index.html
    ├── package-lock.json
    ├── package.json
    ├── postcss.config.js
    ├── public
    │   ├── favicon.ico
    │   ├── placeholder.svg
    │   └── robots.txt
    ├── README.md
    ├── src
    │   ├── App.css
    │   ├── App.tsx
    │   ├── assets
    │   │   ├── function-calls.png
    │   │   ├── graph-total.png
    │   │   ├── hero-graph.jpg
    │   │   └── hierarchy.png
    │   ├── components
    │   │   ├── ComparisonTable.tsx
    │   │   ├── CookbookSection.tsx
    │   │   ├── DemoSection.tsx
    │   │   ├── ExamplesSection.tsx
    │   │   ├── FeaturesSection.tsx
    │   │   ├── Footer.tsx
    │   │   ├── HeroSection.tsx
    │   │   ├── InstallationSection.tsx
    │   │   ├── MoveToTop.tsx
    │   │   ├── ShowDownloads.tsx
    │   │   ├── ShowStarGraph.tsx
    │   │   ├── TestimonialSection.tsx
    │   │   ├── ThemeProvider.tsx
    │   │   ├── ThemeToggle.tsx
    │   │   └── ui
    │   │       ├── accordion.tsx
    │   │       ├── alert-dialog.tsx
    │   │       ├── alert.tsx
    │   │       ├── aspect-ratio.tsx
    │   │       ├── avatar.tsx
    │   │       ├── badge.tsx
    │   │       ├── breadcrumb.tsx
    │   │       ├── button.tsx
    │   │       ├── calendar.tsx
    │   │       ├── card.tsx
    │   │       ├── carousel.tsx
    │   │       ├── chart.tsx
    │   │       ├── checkbox.tsx
    │   │       ├── collapsible.tsx
    │   │       ├── command.tsx
    │   │       ├── context-menu.tsx
    │   │       ├── dialog.tsx
    │   │       ├── drawer.tsx
    │   │       ├── dropdown-menu.tsx
    │   │       ├── form.tsx
    │   │       ├── hover-card.tsx
    │   │       ├── input-otp.tsx
    │   │       ├── input.tsx
    │   │       ├── label.tsx
    │   │       ├── menubar.tsx
    │   │       ├── navigation-menu.tsx
    │   │       ├── orbiting-circles.tsx
    │   │       ├── pagination.tsx
    │   │       ├── popover.tsx
    │   │       ├── progress.tsx
    │   │       ├── radio-group.tsx
    │   │       ├── resizable.tsx
    │   │       ├── scroll-area.tsx
    │   │       ├── select.tsx
    │   │       ├── separator.tsx
    │   │       ├── sheet.tsx
    │   │       ├── sidebar.tsx
    │   │       ├── skeleton.tsx
    │   │       ├── slider.tsx
    │   │       ├── sonner.tsx
    │   │       ├── switch.tsx
    │   │       ├── table.tsx
    │   │       ├── tabs.tsx
    │   │       ├── textarea.tsx
    │   │       ├── toast.tsx
    │   │       ├── toaster.tsx
    │   │       ├── toggle-group.tsx
    │   │       ├── toggle.tsx
    │   │       ├── tooltip.tsx
    │   │       └── use-toast.ts
    │   ├── hooks
    │   │   ├── use-mobile.tsx
    │   │   └── use-toast.ts
    │   ├── index.css
    │   ├── lib
    │   │   └── utils.ts
    │   ├── main.tsx
    │   ├── pages
    │   │   ├── Index.tsx
    │   │   └── NotFound.tsx
    │   └── vite-env.d.ts
    ├── tailwind.config.ts
    ├── tsconfig.app.json
    ├── tsconfig.json
    ├── tsconfig.node.json
    ├── vercel.json
    └── vite.config.ts
```

# Files

--------------------------------------------------------------------------------
/docs/site/cookbook/index.html:
--------------------------------------------------------------------------------

```html
   1 | 
   2 | <!doctype html>
   3 | <html lang="en" class="no-js">
   4 |   <head>
   5 |     
   6 |       <meta charset="utf-8">
   7 |       <meta name="viewport" content="width=device-width,initial-scale=1">
   8 |       
   9 |       
  10 |       
  11 |       
  12 |         <link rel="prev" href="../tools/">
  13 |       
  14 |       
  15 |         <link rel="next" href="../contributing/">
  16 |       
  17 |       
  18 |       <link rel="icon" href="../assets/images/favicon.png">
  19 |       <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.21">
  20 |     
  21 |     
  22 |       
  23 |         <title>Cookbook - CodeGraphContext</title>
  24 |       
  25 |     
  26 |     
  27 |       <link rel="stylesheet" href="../assets/stylesheets/main.2a3383ac.min.css">
  28 |       
  29 |       
  30 | 
  31 | 
  32 |     
  33 |     
  34 |       
  35 |     
  36 |     
  37 |       
  38 |         
  39 |         
  40 |         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  41 |         <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
  42 |         <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
  43 |       
  44 |     
  45 |     
  46 |     <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  47 |     
  48 |       
  49 | 
  50 |     
  51 |     
  52 |     
  53 |   </head>
  54 |   
  55 |   
  56 |     <body dir="ltr">
  57 |   
  58 |     
  59 |     <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  60 |     <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  61 |     <label class="md-overlay" for="__drawer"></label>
  62 |     <div data-md-component="skip">
  63 |       
  64 |         
  65 |         <a href="#mcp-tool-cookbook" class="md-skip">
  66 |           Skip to content
  67 |         </a>
  68 |       
  69 |     </div>
  70 |     <div data-md-component="announce">
  71 |       
  72 |     </div>
  73 |     
  74 |     
  75 |       
  76 | 
  77 |   
  78 | 
  79 | <header class="md-header md-header--shadow" data-md-component="header">
  80 |   <nav class="md-header__inner md-grid" aria-label="Header">
  81 |     <a href=".." title="CodeGraphContext" class="md-header__button md-logo" aria-label="CodeGraphContext" data-md-component="logo">
  82 |       
  83 |   
  84 |   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
  85 | 
  86 |     </a>
  87 |     <label class="md-header__button md-icon" for="__drawer">
  88 |       
  89 |       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
  90 |     </label>
  91 |     <div class="md-header__title" data-md-component="header-title">
  92 |       <div class="md-header__ellipsis">
  93 |         <div class="md-header__topic">
  94 |           <span class="md-ellipsis">
  95 |             CodeGraphContext
  96 |           </span>
  97 |         </div>
  98 |         <div class="md-header__topic" data-md-component="header-topic">
  99 |           <span class="md-ellipsis">
 100 |             
 101 |               Cookbook
 102 |             
 103 |           </span>
 104 |         </div>
 105 |       </div>
 106 |     </div>
 107 |     
 108 |     
 109 |       <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
 110 |     
 111 |     
 112 |     
 113 |       
 114 |       
 115 |         <label class="md-header__button md-icon" for="__search">
 116 |           
 117 |           <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
 118 |         </label>
 119 |         <div class="md-search" data-md-component="search" role="dialog">
 120 |   <label class="md-search__overlay" for="__search"></label>
 121 |   <div class="md-search__inner" role="search">
 122 |     <form class="md-search__form" name="search">
 123 |       <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
 124 |       <label class="md-search__icon md-icon" for="__search">
 125 |         
 126 |         <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
 127 |         
 128 |         <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
 129 |       </label>
 130 |       <nav class="md-search__options" aria-label="Search">
 131 |         
 132 |         <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
 133 |           
 134 |           <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
 135 |         </button>
 136 |       </nav>
 137 |       
 138 |     </form>
 139 |     <div class="md-search__output">
 140 |       <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
 141 |         <div class="md-search-result" data-md-component="search-result">
 142 |           <div class="md-search-result__meta">
 143 |             Initializing search
 144 |           </div>
 145 |           <ol class="md-search-result__list" role="presentation"></ol>
 146 |         </div>
 147 |       </div>
 148 |     </div>
 149 |   </div>
 150 | </div>
 151 |       
 152 |     
 153 |     
 154 |   </nav>
 155 |   
 156 | </header>
 157 |     
 158 |     <div class="md-container" data-md-component="container">
 159 |       
 160 |       
 161 |         
 162 |           
 163 |         
 164 |       
 165 |       <main class="md-main" data-md-component="main">
 166 |         <div class="md-main__inner md-grid">
 167 |           
 168 |             
 169 |               
 170 |               <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
 171 |                 <div class="md-sidebar__scrollwrap">
 172 |                   <div class="md-sidebar__inner">
 173 |                     
 174 | 
 175 | 
 176 | 
 177 | <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
 178 |   <label class="md-nav__title" for="__drawer">
 179 |     <a href=".." title="CodeGraphContext" class="md-nav__button md-logo" aria-label="CodeGraphContext" data-md-component="logo">
 180 |       
 181 |   
 182 |   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
 183 | 
 184 |     </a>
 185 |     CodeGraphContext
 186 |   </label>
 187 |   
 188 |   <ul class="md-nav__list" data-md-scrollfix>
 189 |     
 190 |       
 191 |       
 192 |   
 193 |   
 194 |   
 195 |   
 196 |     <li class="md-nav__item">
 197 |       <a href=".." class="md-nav__link">
 198 |         
 199 |   
 200 |   
 201 |   <span class="md-ellipsis">
 202 |     Home
 203 |     
 204 |   </span>
 205 |   
 206 | 
 207 |       </a>
 208 |     </li>
 209 |   
 210 | 
 211 |     
 212 |       
 213 |       
 214 |   
 215 |   
 216 |   
 217 |   
 218 |     <li class="md-nav__item">
 219 |       <a href="../installation/" class="md-nav__link">
 220 |         
 221 |   
 222 |   
 223 |   <span class="md-ellipsis">
 224 |     Installation
 225 |     
 226 |   </span>
 227 |   
 228 | 
 229 |       </a>
 230 |     </li>
 231 |   
 232 | 
 233 |     
 234 |       
 235 |       
 236 |   
 237 |   
 238 |   
 239 |   
 240 |     <li class="md-nav__item">
 241 |       <a href="../use_cases/" class="md-nav__link">
 242 |         
 243 |   
 244 |   
 245 |   <span class="md-ellipsis">
 246 |     Use Cases
 247 |     
 248 |   </span>
 249 |   
 250 | 
 251 |       </a>
 252 |     </li>
 253 |   
 254 | 
 255 |     
 256 |       
 257 |       
 258 |   
 259 |   
 260 |   
 261 |   
 262 |     <li class="md-nav__item">
 263 |       <a href="../architecture/" class="md-nav__link">
 264 |         
 265 |   
 266 |   
 267 |   <span class="md-ellipsis">
 268 |     Architecture
 269 |     
 270 |   </span>
 271 |   
 272 | 
 273 |       </a>
 274 |     </li>
 275 |   
 276 | 
 277 |     
 278 |       
 279 |       
 280 |   
 281 |   
 282 |   
 283 |   
 284 |     <li class="md-nav__item">
 285 |       <a href="../cli/" class="md-nav__link">
 286 |         
 287 |   
 288 |   
 289 |   <span class="md-ellipsis">
 290 |     CLI Reference
 291 |     
 292 |   </span>
 293 |   
 294 | 
 295 |       </a>
 296 |     </li>
 297 |   
 298 | 
 299 |     
 300 |       
 301 |       
 302 |   
 303 |   
 304 |   
 305 |   
 306 |     <li class="md-nav__item">
 307 |       <a href="../server/" class="md-nav__link">
 308 |         
 309 |   
 310 |   
 311 |   <span class="md-ellipsis">
 312 |     Server
 313 |     
 314 |   </span>
 315 |   
 316 | 
 317 |       </a>
 318 |     </li>
 319 |   
 320 | 
 321 |     
 322 |       
 323 |       
 324 |   
 325 |   
 326 |   
 327 |   
 328 |     <li class="md-nav__item">
 329 |       <a href="../core/" class="md-nav__link">
 330 |         
 331 |   
 332 |   
 333 |   <span class="md-ellipsis">
 334 |     Core Concepts
 335 |     
 336 |   </span>
 337 |   
 338 | 
 339 |       </a>
 340 |     </li>
 341 |   
 342 | 
 343 |     
 344 |       
 345 |       
 346 |   
 347 |   
 348 |   
 349 |   
 350 |     <li class="md-nav__item">
 351 |       <a href="../tools/" class="md-nav__link">
 352 |         
 353 |   
 354 |   
 355 |   <span class="md-ellipsis">
 356 |     Tools
 357 |     
 358 |   </span>
 359 |   
 360 | 
 361 |       </a>
 362 |     </li>
 363 |   
 364 | 
 365 |     
 366 |       
 367 |       
 368 |   
 369 |   
 370 |     
 371 |   
 372 |   
 373 |   
 374 |     <li class="md-nav__item md-nav__item--active">
 375 |       
 376 |       <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
 377 |       
 378 |       
 379 |         
 380 |       
 381 |       
 382 |         <label class="md-nav__link md-nav__link--active" for="__toc">
 383 |           
 384 |   
 385 |   
 386 |   <span class="md-ellipsis">
 387 |     Cookbook
 388 |     
 389 |   </span>
 390 |   
 391 | 
 392 |           <span class="md-nav__icon md-icon"></span>
 393 |         </label>
 394 |       
 395 |       <a href="./" class="md-nav__link md-nav__link--active">
 396 |         
 397 |   
 398 |   
 399 |   <span class="md-ellipsis">
 400 |     Cookbook
 401 |     
 402 |   </span>
 403 |   
 404 | 
 405 |       </a>
 406 |       
 407 |         
 408 | 
 409 | <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
 410 |   
 411 |   
 412 |   
 413 |     
 414 |   
 415 |   
 416 |     <label class="md-nav__title" for="__toc">
 417 |       <span class="md-nav__icon md-icon"></span>
 418 |       Table of contents
 419 |     </label>
 420 |     <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
 421 |       
 422 |         <li class="md-nav__item">
 423 |   <a href="#basic-queries" class="md-nav__link">
 424 |     <span class="md-ellipsis">
 425 |       Basic Queries
 426 |     </span>
 427 |   </a>
 428 |   
 429 |     <nav class="md-nav" aria-label="Basic Queries">
 430 |       <ul class="md-nav__list">
 431 |         
 432 |           <li class="md-nav__item">
 433 |   <a href="#1-find-a-specific-function-by-name" class="md-nav__link">
 434 |     <span class="md-ellipsis">
 435 |       1. Find a specific function by name
 436 |     </span>
 437 |   </a>
 438 |   
 439 | </li>
 440 |         
 441 |           <li class="md-nav__item">
 442 |   <a href="#2-find-all-calls-to-a-specific-function" class="md-nav__link">
 443 |     <span class="md-ellipsis">
 444 |       2. Find all calls to a specific function
 445 |     </span>
 446 |   </a>
 447 |   
 448 | </li>
 449 |         
 450 |           <li class="md-nav__item">
 451 |   <a href="#3-find-what-a-function-calls" class="md-nav__link">
 452 |     <span class="md-ellipsis">
 453 |       3. Find what a function calls
 454 |     </span>
 455 |   </a>
 456 |   
 457 | </li>
 458 |         
 459 |           <li class="md-nav__item">
 460 |   <a href="#4-find-all-imports-of-a-specific-module" class="md-nav__link">
 461 |     <span class="md-ellipsis">
 462 |       4. Find all imports of a specific module
 463 |     </span>
 464 |   </a>
 465 |   
 466 | </li>
 467 |         
 468 |           <li class="md-nav__item">
 469 |   <a href="#5-find-all-methods-of-a-class" class="md-nav__link">
 470 |     <span class="md-ellipsis">
 471 |       5. Find all methods of a class
 472 |     </span>
 473 |   </a>
 474 |   
 475 | </li>
 476 |         
 477 |           <li class="md-nav__item">
 478 |   <a href="#6-find-all-classes-that-inherit-from-a-specific-class" class="md-nav__link">
 479 |     <span class="md-ellipsis">
 480 |       6. Find all classes that inherit from a specific class
 481 |     </span>
 482 |   </a>
 483 |   
 484 | </li>
 485 |         
 486 |           <li class="md-nav__item">
 487 |   <a href="#7-find-all-functions-with-a-specific-decorator" class="md-nav__link">
 488 |     <span class="md-ellipsis">
 489 |       7. Find all functions with a specific decorator
 490 |     </span>
 491 |   </a>
 492 |   
 493 | </li>
 494 |         
 495 |           <li class="md-nav__item">
 496 |   <a href="#8-find-all-dataclasses" class="md-nav__link">
 497 |     <span class="md-ellipsis">
 498 |       8. Find all dataclasses
 499 |     </span>
 500 |   </a>
 501 |   
 502 | </li>
 503 |         
 504 |       </ul>
 505 |     </nav>
 506 |   
 507 | </li>
 508 |       
 509 |         <li class="md-nav__item">
 510 |   <a href="#code-analysis-quality" class="md-nav__link">
 511 |     <span class="md-ellipsis">
 512 |       Code Analysis &amp; Quality
 513 |     </span>
 514 |   </a>
 515 |   
 516 |     <nav class="md-nav" aria-label="Code Analysis &amp; Quality">
 517 |       <ul class="md-nav__list">
 518 |         
 519 |           <li class="md-nav__item">
 520 |   <a href="#9-find-the-5-most-complex-functions" class="md-nav__link">
 521 |     <span class="md-ellipsis">
 522 |       9. Find the 5 most complex functions
 523 |     </span>
 524 |   </a>
 525 |   
 526 | </li>
 527 |         
 528 |           <li class="md-nav__item">
 529 |   <a href="#10-calculate-cyclomatic-complexity-of-a-function" class="md-nav__link">
 530 |     <span class="md-ellipsis">
 531 |       10. Calculate cyclomatic complexity of a function
 532 |     </span>
 533 |   </a>
 534 |   
 535 | </li>
 536 |         
 537 |           <li class="md-nav__item">
 538 |   <a href="#11-find-unused-code" class="md-nav__link">
 539 |     <span class="md-ellipsis">
 540 |       11. Find unused code
 541 |     </span>
 542 |   </a>
 543 |   
 544 | </li>
 545 |         
 546 |           <li class="md-nav__item">
 547 |   <a href="#12-find-the-call-chain-between-two-functions" class="md-nav__link">
 548 |     <span class="md-ellipsis">
 549 |       12. Find the call chain between two functions
 550 |     </span>
 551 |   </a>
 552 |   
 553 | </li>
 554 |         
 555 |           <li class="md-nav__item">
 556 |   <a href="#13-find-all-direct-and-indirect-callers-of-a-function" class="md-nav__link">
 557 |     <span class="md-ellipsis">
 558 |       13. Find all direct and indirect callers of a function
 559 |     </span>
 560 |   </a>
 561 |   
 562 | </li>
 563 |         
 564 |           <li class="md-nav__item">
 565 |   <a href="#14-find-functions-by-argument-name" class="md-nav__link">
 566 |     <span class="md-ellipsis">
 567 |       14. Find functions by argument name
 568 |     </span>
 569 |   </a>
 570 |   
 571 | </li>
 572 |         
 573 |           <li class="md-nav__item">
 574 |   <a href="#15-list-all-python-package-imports-from-a-directory" class="md-nav__link">
 575 |     <span class="md-ellipsis">
 576 |       15. List all python package imports from a directory
 577 |     </span>
 578 |   </a>
 579 |   
 580 | </li>
 581 |         
 582 |       </ul>
 583 |     </nav>
 584 |   
 585 | </li>
 586 |       
 587 |         <li class="md-nav__item">
 588 |   <a href="#repository-information-queries" class="md-nav__link">
 589 |     <span class="md-ellipsis">
 590 |       Repository Information Queries
 591 |     </span>
 592 |   </a>
 593 |   
 594 |     <nav class="md-nav" aria-label="Repository Information Queries">
 595 |       <ul class="md-nav__list">
 596 |         
 597 |           <li class="md-nav__item">
 598 |   <a href="#16-list-all-indexed-projects" class="md-nav__link">
 599 |     <span class="md-ellipsis">
 600 |       16. List all indexed projects
 601 |     </span>
 602 |   </a>
 603 |   
 604 | </li>
 605 |         
 606 |           <li class="md-nav__item">
 607 |   <a href="#17-check-the-status-of-an-indexing-job" class="md-nav__link">
 608 |     <span class="md-ellipsis">
 609 |       17. Check the status of an indexing job
 610 |     </span>
 611 |   </a>
 612 |   
 613 | </li>
 614 |         
 615 |           <li class="md-nav__item">
 616 |   <a href="#18-list-all-background-jobs" class="md-nav__link">
 617 |     <span class="md-ellipsis">
 618 |       18. List all background jobs
 619 |     </span>
 620 |   </a>
 621 |   
 622 | </li>
 623 |         
 624 |       </ul>
 625 |     </nav>
 626 |   
 627 | </li>
 628 |       
 629 |         <li class="md-nav__item">
 630 |   <a href="#advanced-cypher-queries" class="md-nav__link">
 631 |     <span class="md-ellipsis">
 632 |       Advanced Cypher Queries
 633 |     </span>
 634 |   </a>
 635 |   
 636 |     <nav class="md-nav" aria-label="Advanced Cypher Queries">
 637 |       <ul class="md-nav__list">
 638 |         
 639 |           <li class="md-nav__item">
 640 |   <a href="#19-find-all-function-definitions" class="md-nav__link">
 641 |     <span class="md-ellipsis">
 642 |       19. Find all function definitions
 643 |     </span>
 644 |   </a>
 645 |   
 646 | </li>
 647 |         
 648 |           <li class="md-nav__item">
 649 |   <a href="#20-find-all-classes" class="md-nav__link">
 650 |     <span class="md-ellipsis">
 651 |       20. Find all classes
 652 |     </span>
 653 |   </a>
 654 |   
 655 | </li>
 656 |         
 657 |           <li class="md-nav__item">
 658 |   <a href="#21-find-all-functions-in-a-file" class="md-nav__link">
 659 |     <span class="md-ellipsis">
 660 |       21. Find all functions in a file
 661 |     </span>
 662 |   </a>
 663 |   
 664 | </li>
 665 |         
 666 |           <li class="md-nav__item">
 667 |   <a href="#22-find-all-classes-in-a-file" class="md-nav__link">
 668 |     <span class="md-ellipsis">
 669 |       22. Find all classes in a file
 670 |     </span>
 671 |   </a>
 672 |   
 673 | </li>
 674 |         
 675 |           <li class="md-nav__item">
 676 |   <a href="#23-list-all-top-level-functions-and-classes-in-a-file" class="md-nav__link">
 677 |     <span class="md-ellipsis">
 678 |       23. List all top-level functions and classes in a file
 679 |     </span>
 680 |   </a>
 681 |   
 682 | </li>
 683 |         
 684 |           <li class="md-nav__item">
 685 |   <a href="#24-find-functions-in-one-module-that-call-a-function-in-another" class="md-nav__link">
 686 |     <span class="md-ellipsis">
 687 |       24. Find functions in one module that call a function in another
 688 |     </span>
 689 |   </a>
 690 |   
 691 | </li>
 692 |         
 693 |           <li class="md-nav__item">
 694 |   <a href="#25-find-circular-file-imports" class="md-nav__link">
 695 |     <span class="md-ellipsis">
 696 |       25. Find circular file imports
 697 |     </span>
 698 |   </a>
 699 |   
 700 | </li>
 701 |         
 702 |           <li class="md-nav__item">
 703 |   <a href="#26-find-all-functions-with-more-than-5-arguments" class="md-nav__link">
 704 |     <span class="md-ellipsis">
 705 |       26. Find all functions with more than 5 arguments
 706 |     </span>
 707 |   </a>
 708 |   
 709 | </li>
 710 |         
 711 |           <li class="md-nav__item">
 712 |   <a href="#27-find-all-functions-in-a-file-that-have-a-docstring" class="md-nav__link">
 713 |     <span class="md-ellipsis">
 714 |       27. Find all functions in a file that have a docstring
 715 |     </span>
 716 |   </a>
 717 |   
 718 | </li>
 719 |         
 720 |           <li class="md-nav__item">
 721 |   <a href="#28-find-all-classes-that-have-a-specific-method" class="md-nav__link">
 722 |     <span class="md-ellipsis">
 723 |       28. Find all classes that have a specific method
 724 |     </span>
 725 |   </a>
 726 |   
 727 | </li>
 728 |         
 729 |           <li class="md-nav__item">
 730 |   <a href="#29-find-the-depth-of-inheritance-for-all-classes" class="md-nav__link">
 731 |     <span class="md-ellipsis">
 732 |       29. Find the depth of inheritance for all classes
 733 |     </span>
 734 |   </a>
 735 |   
 736 | </li>
 737 |         
 738 |           <li class="md-nav__item">
 739 |   <a href="#30-find-all-functions-that-have-a-docstring" class="md-nav__link">
 740 |     <span class="md-ellipsis">
 741 |       30. Find all functions that have a docstring
 742 |     </span>
 743 |   </a>
 744 |   
 745 | </li>
 746 |         
 747 |           <li class="md-nav__item">
 748 |   <a href="#31-find-all-decorated-methods-in-a-class" class="md-nav__link">
 749 |     <span class="md-ellipsis">
 750 |       31. Find all decorated methods in a class
 751 |     </span>
 752 |   </a>
 753 |   
 754 | </li>
 755 |         
 756 |           <li class="md-nav__item">
 757 |   <a href="#32-find-the-number-of-functions-in-each-file" class="md-nav__link">
 758 |     <span class="md-ellipsis">
 759 |       32. Find the number of functions in each file
 760 |     </span>
 761 |   </a>
 762 |   
 763 | </li>
 764 |         
 765 |           <li class="md-nav__item">
 766 |   <a href="#33-find-all-methods-that-override-a-parent-method" class="md-nav__link">
 767 |     <span class="md-ellipsis">
 768 |       33. Find all methods that override a parent method
 769 |     </span>
 770 |   </a>
 771 |   
 772 | </li>
 773 |         
 774 |           <li class="md-nav__item">
 775 |   <a href="#34-find-all-functions-that-call-super" class="md-nav__link">
 776 |     <span class="md-ellipsis">
 777 |       34. Find all functions that call super()
 778 |     </span>
 779 |   </a>
 780 |   
 781 | </li>
 782 |         
 783 |           <li class="md-nav__item">
 784 |   <a href="#35-find-all-calls-to-a-function-with-a-specific-argument" class="md-nav__link">
 785 |     <span class="md-ellipsis">
 786 |       35. Find all calls to a function with a specific argument
 787 |     </span>
 788 |   </a>
 789 |   
 790 | </li>
 791 |         
 792 |           <li class="md-nav__item">
 793 |   <a href="#36-find-all-functions-that-are-not-called-by-any-other-function" class="md-nav__link">
 794 |     <span class="md-ellipsis">
 795 |       36. Find all functions that are not called by any other function
 796 |     </span>
 797 |   </a>
 798 |   
 799 | </li>
 800 |         
 801 |           <li class="md-nav__item">
 802 |   <a href="#37-find-all-functions-that-are-called-with-a-specific-argument" class="md-nav__link">
 803 |     <span class="md-ellipsis">
 804 |       37. Find all functions that are called with a specific argument
 805 |     </span>
 806 |   </a>
 807 |   
 808 | </li>
 809 |         
 810 |           <li class="md-nav__item">
 811 |   <a href="#38-find-all-direct-and-indirect-callees-of-a-function" class="md-nav__link">
 812 |     <span class="md-ellipsis">
 813 |       38. Find all direct and indirect callees of a function
 814 |     </span>
 815 |   </a>
 816 |   
 817 | </li>
 818 |         
 819 |           <li class="md-nav__item">
 820 |   <a href="#39-find-all-functions-that-are-overridden" class="md-nav__link">
 821 |     <span class="md-ellipsis">
 822 |       39. Find all functions that are overridden
 823 |     </span>
 824 |   </a>
 825 |   
 826 | </li>
 827 |         
 828 |           <li class="md-nav__item">
 829 |   <a href="#40-find-all-modules-imported-by-module_a" class="md-nav__link">
 830 |     <span class="md-ellipsis">
 831 |       40. Find all modules imported by module_a
 832 |     </span>
 833 |   </a>
 834 |   
 835 | </li>
 836 |         
 837 |           <li class="md-nav__item">
 838 |   <a href="#41-find-large-functions-that-should-be-refactored" class="md-nav__link">
 839 |     <span class="md-ellipsis">
 840 |       41. Find large functions that should be refactored
 841 |     </span>
 842 |   </a>
 843 |   
 844 | </li>
 845 |         
 846 |           <li class="md-nav__item">
 847 |   <a href="#42-find-recursive-functions" class="md-nav__link">
 848 |     <span class="md-ellipsis">
 849 |       42. Find recursive functions
 850 |     </span>
 851 |   </a>
 852 |   
 853 | </li>
 854 |         
 855 |           <li class="md-nav__item">
 856 |   <a href="#43-find-most-connected-functions-hub-functions" class="md-nav__link">
 857 |     <span class="md-ellipsis">
 858 |       43. Find most connected functions (hub functions)
 859 |     </span>
 860 |   </a>
 861 |   
 862 | </li>
 863 |         
 864 |       </ul>
 865 |     </nav>
 866 |   
 867 | </li>
 868 |       
 869 |         <li class="md-nav__item">
 870 |   <a href="#security-sensitive-data-analysis" class="md-nav__link">
 871 |     <span class="md-ellipsis">
 872 |       Security &amp; Sensitive Data Analysis
 873 |     </span>
 874 |   </a>
 875 |   
 876 |     <nav class="md-nav" aria-label="Security &amp; Sensitive Data Analysis">
 877 |       <ul class="md-nav__list">
 878 |         
 879 |           <li class="md-nav__item">
 880 |   <a href="#44-find-potential-security-vulnerabilities-hardcoded-secrets" class="md-nav__link">
 881 |     <span class="md-ellipsis">
 882 |       44. Find potential security vulnerabilities (hardcoded secrets)
 883 |     </span>
 884 |   </a>
 885 |   
 886 | </li>
 887 |         
 888 |       </ul>
 889 |     </nav>
 890 |   
 891 | </li>
 892 |       
 893 |     </ul>
 894 |   
 895 | </nav>
 896 |       
 897 |     </li>
 898 |   
 899 | 
 900 |     
 901 |       
 902 |       
 903 |   
 904 |   
 905 |   
 906 |   
 907 |     
 908 |     
 909 |     
 910 |     
 911 |     
 912 |     <li class="md-nav__item md-nav__item--nested">
 913 |       
 914 |         
 915 |         
 916 |         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_10" >
 917 |         
 918 |           
 919 |           <label class="md-nav__link" for="__nav_10" id="__nav_10_label" tabindex="0">
 920 |             
 921 |   
 922 |   
 923 |   <span class="md-ellipsis">
 924 |     Contributing
 925 |     
 926 |   </span>
 927 |   
 928 | 
 929 |             <span class="md-nav__icon md-icon"></span>
 930 |           </label>
 931 |         
 932 |         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
 933 |           <label class="md-nav__title" for="__nav_10">
 934 |             <span class="md-nav__icon md-icon"></span>
 935 |             Contributing
 936 |           </label>
 937 |           <ul class="md-nav__list" data-md-scrollfix>
 938 |             
 939 |               
 940 |                 
 941 |   
 942 |   
 943 |   
 944 |   
 945 |     <li class="md-nav__item">
 946 |       <a href="../contributing/" class="md-nav__link">
 947 |         
 948 |   
 949 |   
 950 |   <span class="md-ellipsis">
 951 |     Overview
 952 |     
 953 |   </span>
 954 |   
 955 | 
 956 |       </a>
 957 |     </li>
 958 |   
 959 | 
 960 |               
 961 |             
 962 |               
 963 |                 
 964 |   
 965 |   
 966 |   
 967 |   
 968 |     <li class="md-nav__item">
 969 |       <a href="../contributing_languages/" class="md-nav__link">
 970 |         
 971 |   
 972 |   
 973 |   <span class="md-ellipsis">
 974 |     Adding New Languages
 975 |     
 976 |   </span>
 977 |   
 978 | 
 979 |       </a>
 980 |     </li>
 981 |   
 982 | 
 983 |               
 984 |             
 985 |           </ul>
 986 |         </nav>
 987 |       
 988 |     </li>
 989 |   
 990 | 
 991 |     
 992 |       
 993 |       
 994 |   
 995 |   
 996 |   
 997 |   
 998 |     <li class="md-nav__item">
 999 |       <a href="../troubleshooting/" class="md-nav__link">
1000 |         
1001 |   
1002 |   
1003 |   <span class="md-ellipsis">
1004 |     Troubleshooting
1005 |     
1006 |   </span>
1007 |   
1008 | 
1009 |       </a>
1010 |     </li>
1011 |   
1012 | 
1013 |     
1014 |       
1015 |       
1016 |   
1017 |   
1018 |   
1019 |   
1020 |     <li class="md-nav__item">
1021 |       <a href="../future_work/" class="md-nav__link">
1022 |         
1023 |   
1024 |   
1025 |   <span class="md-ellipsis">
1026 |     Future Work
1027 |     
1028 |   </span>
1029 |   
1030 | 
1031 |       </a>
1032 |     </li>
1033 |   
1034 | 
1035 |     
1036 |       
1037 |       
1038 |   
1039 |   
1040 |   
1041 |   
1042 |     <li class="md-nav__item">
1043 |       <a href="../license/" class="md-nav__link">
1044 |         
1045 |   
1046 |   
1047 |   <span class="md-ellipsis">
1048 |     License
1049 |     
1050 |   </span>
1051 |   
1052 | 
1053 |       </a>
1054 |     </li>
1055 |   
1056 | 
1057 |     
1058 |   </ul>
1059 | </nav>
1060 |                   </div>
1061 |                 </div>
1062 |               </div>
1063 |             
1064 |             
1065 |               
1066 |               <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1067 |                 <div class="md-sidebar__scrollwrap">
1068 |                   <div class="md-sidebar__inner">
1069 |                     
1070 | 
1071 | <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1072 |   
1073 |   
1074 |   
1075 |     
1076 |   
1077 |   
1078 |     <label class="md-nav__title" for="__toc">
1079 |       <span class="md-nav__icon md-icon"></span>
1080 |       Table of contents
1081 |     </label>
1082 |     <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1083 |       
1084 |         <li class="md-nav__item">
1085 |   <a href="#basic-queries" class="md-nav__link">
1086 |     <span class="md-ellipsis">
1087 |       Basic Queries
1088 |     </span>
1089 |   </a>
1090 |   
1091 |     <nav class="md-nav" aria-label="Basic Queries">
1092 |       <ul class="md-nav__list">
1093 |         
1094 |           <li class="md-nav__item">
1095 |   <a href="#1-find-a-specific-function-by-name" class="md-nav__link">
1096 |     <span class="md-ellipsis">
1097 |       1. Find a specific function by name
1098 |     </span>
1099 |   </a>
1100 |   
1101 | </li>
1102 |         
1103 |           <li class="md-nav__item">
1104 |   <a href="#2-find-all-calls-to-a-specific-function" class="md-nav__link">
1105 |     <span class="md-ellipsis">
1106 |       2. Find all calls to a specific function
1107 |     </span>
1108 |   </a>
1109 |   
1110 | </li>
1111 |         
1112 |           <li class="md-nav__item">
1113 |   <a href="#3-find-what-a-function-calls" class="md-nav__link">
1114 |     <span class="md-ellipsis">
1115 |       3. Find what a function calls
1116 |     </span>
1117 |   </a>
1118 |   
1119 | </li>
1120 |         
1121 |           <li class="md-nav__item">
1122 |   <a href="#4-find-all-imports-of-a-specific-module" class="md-nav__link">
1123 |     <span class="md-ellipsis">
1124 |       4. Find all imports of a specific module
1125 |     </span>
1126 |   </a>
1127 |   
1128 | </li>
1129 |         
1130 |           <li class="md-nav__item">
1131 |   <a href="#5-find-all-methods-of-a-class" class="md-nav__link">
1132 |     <span class="md-ellipsis">
1133 |       5. Find all methods of a class
1134 |     </span>
1135 |   </a>
1136 |   
1137 | </li>
1138 |         
1139 |           <li class="md-nav__item">
1140 |   <a href="#6-find-all-classes-that-inherit-from-a-specific-class" class="md-nav__link">
1141 |     <span class="md-ellipsis">
1142 |       6. Find all classes that inherit from a specific class
1143 |     </span>
1144 |   </a>
1145 |   
1146 | </li>
1147 |         
1148 |           <li class="md-nav__item">
1149 |   <a href="#7-find-all-functions-with-a-specific-decorator" class="md-nav__link">
1150 |     <span class="md-ellipsis">
1151 |       7. Find all functions with a specific decorator
1152 |     </span>
1153 |   </a>
1154 |   
1155 | </li>
1156 |         
1157 |           <li class="md-nav__item">
1158 |   <a href="#8-find-all-dataclasses" class="md-nav__link">
1159 |     <span class="md-ellipsis">
1160 |       8. Find all dataclasses
1161 |     </span>
1162 |   </a>
1163 |   
1164 | </li>
1165 |         
1166 |       </ul>
1167 |     </nav>
1168 |   
1169 | </li>
1170 |       
1171 |         <li class="md-nav__item">
1172 |   <a href="#code-analysis-quality" class="md-nav__link">
1173 |     <span class="md-ellipsis">
1174 |       Code Analysis &amp; Quality
1175 |     </span>
1176 |   </a>
1177 |   
1178 |     <nav class="md-nav" aria-label="Code Analysis &amp; Quality">
1179 |       <ul class="md-nav__list">
1180 |         
1181 |           <li class="md-nav__item">
1182 |   <a href="#9-find-the-5-most-complex-functions" class="md-nav__link">
1183 |     <span class="md-ellipsis">
1184 |       9. Find the 5 most complex functions
1185 |     </span>
1186 |   </a>
1187 |   
1188 | </li>
1189 |         
1190 |           <li class="md-nav__item">
1191 |   <a href="#10-calculate-cyclomatic-complexity-of-a-function" class="md-nav__link">
1192 |     <span class="md-ellipsis">
1193 |       10. Calculate cyclomatic complexity of a function
1194 |     </span>
1195 |   </a>
1196 |   
1197 | </li>
1198 |         
1199 |           <li class="md-nav__item">
1200 |   <a href="#11-find-unused-code" class="md-nav__link">
1201 |     <span class="md-ellipsis">
1202 |       11. Find unused code
1203 |     </span>
1204 |   </a>
1205 |   
1206 | </li>
1207 |         
1208 |           <li class="md-nav__item">
1209 |   <a href="#12-find-the-call-chain-between-two-functions" class="md-nav__link">
1210 |     <span class="md-ellipsis">
1211 |       12. Find the call chain between two functions
1212 |     </span>
1213 |   </a>
1214 |   
1215 | </li>
1216 |         
1217 |           <li class="md-nav__item">
1218 |   <a href="#13-find-all-direct-and-indirect-callers-of-a-function" class="md-nav__link">
1219 |     <span class="md-ellipsis">
1220 |       13. Find all direct and indirect callers of a function
1221 |     </span>
1222 |   </a>
1223 |   
1224 | </li>
1225 |         
1226 |           <li class="md-nav__item">
1227 |   <a href="#14-find-functions-by-argument-name" class="md-nav__link">
1228 |     <span class="md-ellipsis">
1229 |       14. Find functions by argument name
1230 |     </span>
1231 |   </a>
1232 |   
1233 | </li>
1234 |         
1235 |           <li class="md-nav__item">
1236 |   <a href="#15-list-all-python-package-imports-from-a-directory" class="md-nav__link">
1237 |     <span class="md-ellipsis">
1238 |       15. List all python package imports from a directory
1239 |     </span>
1240 |   </a>
1241 |   
1242 | </li>
1243 |         
1244 |       </ul>
1245 |     </nav>
1246 |   
1247 | </li>
1248 |       
1249 |         <li class="md-nav__item">
1250 |   <a href="#repository-information-queries" class="md-nav__link">
1251 |     <span class="md-ellipsis">
1252 |       Repository Information Queries
1253 |     </span>
1254 |   </a>
1255 |   
1256 |     <nav class="md-nav" aria-label="Repository Information Queries">
1257 |       <ul class="md-nav__list">
1258 |         
1259 |           <li class="md-nav__item">
1260 |   <a href="#16-list-all-indexed-projects" class="md-nav__link">
1261 |     <span class="md-ellipsis">
1262 |       16. List all indexed projects
1263 |     </span>
1264 |   </a>
1265 |   
1266 | </li>
1267 |         
1268 |           <li class="md-nav__item">
1269 |   <a href="#17-check-the-status-of-an-indexing-job" class="md-nav__link">
1270 |     <span class="md-ellipsis">
1271 |       17. Check the status of an indexing job
1272 |     </span>
1273 |   </a>
1274 |   
1275 | </li>
1276 |         
1277 |           <li class="md-nav__item">
1278 |   <a href="#18-list-all-background-jobs" class="md-nav__link">
1279 |     <span class="md-ellipsis">
1280 |       18. List all background jobs
1281 |     </span>
1282 |   </a>
1283 |   
1284 | </li>
1285 |         
1286 |       </ul>
1287 |     </nav>
1288 |   
1289 | </li>
1290 |       
1291 |         <li class="md-nav__item">
1292 |   <a href="#advanced-cypher-queries" class="md-nav__link">
1293 |     <span class="md-ellipsis">
1294 |       Advanced Cypher Queries
1295 |     </span>
1296 |   </a>
1297 |   
1298 |     <nav class="md-nav" aria-label="Advanced Cypher Queries">
1299 |       <ul class="md-nav__list">
1300 |         
1301 |           <li class="md-nav__item">
1302 |   <a href="#19-find-all-function-definitions" class="md-nav__link">
1303 |     <span class="md-ellipsis">
1304 |       19. Find all function definitions
1305 |     </span>
1306 |   </a>
1307 |   
1308 | </li>
1309 |         
1310 |           <li class="md-nav__item">
1311 |   <a href="#20-find-all-classes" class="md-nav__link">
1312 |     <span class="md-ellipsis">
1313 |       20. Find all classes
1314 |     </span>
1315 |   </a>
1316 |   
1317 | </li>
1318 |         
1319 |           <li class="md-nav__item">
1320 |   <a href="#21-find-all-functions-in-a-file" class="md-nav__link">
1321 |     <span class="md-ellipsis">
1322 |       21. Find all functions in a file
1323 |     </span>
1324 |   </a>
1325 |   
1326 | </li>
1327 |         
1328 |           <li class="md-nav__item">
1329 |   <a href="#22-find-all-classes-in-a-file" class="md-nav__link">
1330 |     <span class="md-ellipsis">
1331 |       22. Find all classes in a file
1332 |     </span>
1333 |   </a>
1334 |   
1335 | </li>
1336 |         
1337 |           <li class="md-nav__item">
1338 |   <a href="#23-list-all-top-level-functions-and-classes-in-a-file" class="md-nav__link">
1339 |     <span class="md-ellipsis">
1340 |       23. List all top-level functions and classes in a file
1341 |     </span>
1342 |   </a>
1343 |   
1344 | </li>
1345 |         
1346 |           <li class="md-nav__item">
1347 |   <a href="#24-find-functions-in-one-module-that-call-a-function-in-another" class="md-nav__link">
1348 |     <span class="md-ellipsis">
1349 |       24. Find functions in one module that call a function in another
1350 |     </span>
1351 |   </a>
1352 |   
1353 | </li>
1354 |         
1355 |           <li class="md-nav__item">
1356 |   <a href="#25-find-circular-file-imports" class="md-nav__link">
1357 |     <span class="md-ellipsis">
1358 |       25. Find circular file imports
1359 |     </span>
1360 |   </a>
1361 |   
1362 | </li>
1363 |         
1364 |           <li class="md-nav__item">
1365 |   <a href="#26-find-all-functions-with-more-than-5-arguments" class="md-nav__link">
1366 |     <span class="md-ellipsis">
1367 |       26. Find all functions with more than 5 arguments
1368 |     </span>
1369 |   </a>
1370 |   
1371 | </li>
1372 |         
1373 |           <li class="md-nav__item">
1374 |   <a href="#27-find-all-functions-in-a-file-that-have-a-docstring" class="md-nav__link">
1375 |     <span class="md-ellipsis">
1376 |       27. Find all functions in a file that have a docstring
1377 |     </span>
1378 |   </a>
1379 |   
1380 | </li>
1381 |         
1382 |           <li class="md-nav__item">
1383 |   <a href="#28-find-all-classes-that-have-a-specific-method" class="md-nav__link">
1384 |     <span class="md-ellipsis">
1385 |       28. Find all classes that have a specific method
1386 |     </span>
1387 |   </a>
1388 |   
1389 | </li>
1390 |         
1391 |           <li class="md-nav__item">
1392 |   <a href="#29-find-the-depth-of-inheritance-for-all-classes" class="md-nav__link">
1393 |     <span class="md-ellipsis">
1394 |       29. Find the depth of inheritance for all classes
1395 |     </span>
1396 |   </a>
1397 |   
1398 | </li>
1399 |         
1400 |           <li class="md-nav__item">
1401 |   <a href="#30-find-all-functions-that-have-a-docstring" class="md-nav__link">
1402 |     <span class="md-ellipsis">
1403 |       30. Find all functions that have a docstring
1404 |     </span>
1405 |   </a>
1406 |   
1407 | </li>
1408 |         
1409 |           <li class="md-nav__item">
1410 |   <a href="#31-find-all-decorated-methods-in-a-class" class="md-nav__link">
1411 |     <span class="md-ellipsis">
1412 |       31. Find all decorated methods in a class
1413 |     </span>
1414 |   </a>
1415 |   
1416 | </li>
1417 |         
1418 |           <li class="md-nav__item">
1419 |   <a href="#32-find-the-number-of-functions-in-each-file" class="md-nav__link">
1420 |     <span class="md-ellipsis">
1421 |       32. Find the number of functions in each file
1422 |     </span>
1423 |   </a>
1424 |   
1425 | </li>
1426 |         
1427 |           <li class="md-nav__item">
1428 |   <a href="#33-find-all-methods-that-override-a-parent-method" class="md-nav__link">
1429 |     <span class="md-ellipsis">
1430 |       33. Find all methods that override a parent method
1431 |     </span>
1432 |   </a>
1433 |   
1434 | </li>
1435 |         
1436 |           <li class="md-nav__item">
1437 |   <a href="#34-find-all-functions-that-call-super" class="md-nav__link">
1438 |     <span class="md-ellipsis">
1439 |       34. Find all functions that call super()
1440 |     </span>
1441 |   </a>
1442 |   
1443 | </li>
1444 |         
1445 |           <li class="md-nav__item">
1446 |   <a href="#35-find-all-calls-to-a-function-with-a-specific-argument" class="md-nav__link">
1447 |     <span class="md-ellipsis">
1448 |       35. Find all calls to a function with a specific argument
1449 |     </span>
1450 |   </a>
1451 |   
1452 | </li>
1453 |         
1454 |           <li class="md-nav__item">
1455 |   <a href="#36-find-all-functions-that-are-not-called-by-any-other-function" class="md-nav__link">
1456 |     <span class="md-ellipsis">
1457 |       36. Find all functions that are not called by any other function
1458 |     </span>
1459 |   </a>
1460 |   
1461 | </li>
1462 |         
1463 |           <li class="md-nav__item">
1464 |   <a href="#37-find-all-functions-that-are-called-with-a-specific-argument" class="md-nav__link">
1465 |     <span class="md-ellipsis">
1466 |       37. Find all functions that are called with a specific argument
1467 |     </span>
1468 |   </a>
1469 |   
1470 | </li>
1471 |         
1472 |           <li class="md-nav__item">
1473 |   <a href="#38-find-all-direct-and-indirect-callees-of-a-function" class="md-nav__link">
1474 |     <span class="md-ellipsis">
1475 |       38. Find all direct and indirect callees of a function
1476 |     </span>
1477 |   </a>
1478 |   
1479 | </li>
1480 |         
1481 |           <li class="md-nav__item">
1482 |   <a href="#39-find-all-functions-that-are-overridden" class="md-nav__link">
1483 |     <span class="md-ellipsis">
1484 |       39. Find all functions that are overridden
1485 |     </span>
1486 |   </a>
1487 |   
1488 | </li>
1489 |         
1490 |           <li class="md-nav__item">
1491 |   <a href="#40-find-all-modules-imported-by-module_a" class="md-nav__link">
1492 |     <span class="md-ellipsis">
1493 |       40. Find all modules imported by module_a
1494 |     </span>
1495 |   </a>
1496 |   
1497 | </li>
1498 |         
1499 |           <li class="md-nav__item">
1500 |   <a href="#41-find-large-functions-that-should-be-refactored" class="md-nav__link">
1501 |     <span class="md-ellipsis">
1502 |       41. Find large functions that should be refactored
1503 |     </span>
1504 |   </a>
1505 |   
1506 | </li>
1507 |         
1508 |           <li class="md-nav__item">
1509 |   <a href="#42-find-recursive-functions" class="md-nav__link">
1510 |     <span class="md-ellipsis">
1511 |       42. Find recursive functions
1512 |     </span>
1513 |   </a>
1514 |   
1515 | </li>
1516 |         
1517 |           <li class="md-nav__item">
1518 |   <a href="#43-find-most-connected-functions-hub-functions" class="md-nav__link">
1519 |     <span class="md-ellipsis">
1520 |       43. Find most connected functions (hub functions)
1521 |     </span>
1522 |   </a>
1523 |   
1524 | </li>
1525 |         
1526 |       </ul>
1527 |     </nav>
1528 |   
1529 | </li>
1530 |       
1531 |         <li class="md-nav__item">
1532 |   <a href="#security-sensitive-data-analysis" class="md-nav__link">
1533 |     <span class="md-ellipsis">
1534 |       Security &amp; Sensitive Data Analysis
1535 |     </span>
1536 |   </a>
1537 |   
1538 |     <nav class="md-nav" aria-label="Security &amp; Sensitive Data Analysis">
1539 |       <ul class="md-nav__list">
1540 |         
1541 |           <li class="md-nav__item">
1542 |   <a href="#44-find-potential-security-vulnerabilities-hardcoded-secrets" class="md-nav__link">
1543 |     <span class="md-ellipsis">
1544 |       44. Find potential security vulnerabilities (hardcoded secrets)
1545 |     </span>
1546 |   </a>
1547 |   
1548 | </li>
1549 |         
1550 |       </ul>
1551 |     </nav>
1552 |   
1553 | </li>
1554 |       
1555 |     </ul>
1556 |   
1557 | </nav>
1558 |                   </div>
1559 |                 </div>
1560 |               </div>
1561 |             
1562 |           
1563 |           
1564 |             <div class="md-content" data-md-component="content">
1565 |               <article class="md-content__inner md-typeset">
1566 |                 
1567 |                   
1568 | 
1569 | 
1570 | 
1571 | <h1 id="mcp-tool-cookbook">MCP Tool Cookbook</h1>
1572 | <p>This cookbook provides examples of how to use the <code>mcp</code> tool to query and understand your Python codebase. The "Tool" indicates which <code>mcp</code> tool to use, and the "JSON Arguments" are what the LLM would provide to that tool.</p>
1573 | <hr />
1574 | <h2 id="basic-queries">Basic Queries</h2>
1575 | <h3 id="1-find-a-specific-function-by-name">1. Find a specific function by name</h3>
1576 | <ul>
1577 | <li><strong>Natural Language:</strong> "Where is the function <code>foo</code> defined?"</li>
1578 | <li><strong>Tool:</strong> <code>find_code</code></li>
1579 | <li><strong>JSON Arguments:</strong></li>
1580 | </ul>
1581 | <pre><code class="language-json">{
1582 |   &quot;query&quot;: &quot;foo&quot;
1583 | }
1584 | </code></pre>
1585 | <p><img alt="Query 1" src="../images/1.png" /></p>
1586 | <h3 id="2-find-all-calls-to-a-specific-function">2. Find all calls to a specific function</h3>
1587 | <ul>
1588 | <li><strong>Natural Language:</strong> "Find all calls to the <code>helper</code> function."</li>
1589 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1590 | <li><strong>JSON Arguments:</strong></li>
1591 | </ul>
1592 | <pre><code class="language-json">{
1593 |   &quot;query_type&quot;: &quot;find_callers&quot;,
1594 |   &quot;target&quot;: &quot;helper&quot;
1595 | }
1596 | </code></pre>
1597 | <p><img alt="Query 2" src="../images/2.png" /></p>
1598 | <h3 id="3-find-what-a-function-calls">3. Find what a function calls</h3>
1599 | <ul>
1600 | <li><strong>Natural Language:</strong> "What functions are called inside the <code>foo</code> function?"</li>
1601 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1602 | <li><strong>JSON Arguments:</strong></li>
1603 | </ul>
1604 | <pre><code class="language-json">{
1605 |   &quot;query_type&quot;: &quot;find_callees&quot;,
1606 |   &quot;target&quot;: &quot;foo&quot;,
1607 |   &quot;context&quot;: &quot;/teamspace/studios/this_studio/demo/CodeGraphContext/tests/sample_project/module_a.py&quot;
1608 | }
1609 | </code></pre>
1610 | <p><img alt="Query 3" src="../images/3.png" /></p>
1611 | <h3 id="4-find-all-imports-of-a-specific-module">4. Find all imports of a specific module</h3>
1612 | <ul>
1613 | <li><strong>Natural Language:</strong> "Where is the <code>math</code> module imported?"</li>
1614 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1615 | <li><strong>JSON Arguments:</strong></li>
1616 | </ul>
1617 | <pre><code class="language-json">{
1618 |   &quot;query_type&quot;: &quot;find_importers&quot;,
1619 |   &quot;target&quot;: &quot;math&quot;
1620 | }
1621 | </code></pre>
1622 | <p><img alt="Query 4" src="../images/4.png" /></p>
1623 | <h3 id="5-find-all-methods-of-a-class">5. Find all methods of a class</h3>
1624 | <ul>
1625 | <li><strong>Natural Language:</strong> "What are the methods of the <code>A</code> class?"</li>
1626 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1627 | <li><strong>JSON Arguments:</strong></li>
1628 | </ul>
1629 | <pre><code class="language-json">{
1630 |   &quot;query_type&quot;: &quot;class_hierarchy&quot;,
1631 |   &quot;target&quot;: &quot;A&quot;
1632 | }
1633 | </code></pre>
1634 | <ul>
1635 | <li><strong>Note:</strong> The response for <code>class_hierarchy</code> includes a list of methods.</li>
1636 | </ul>
1637 | <p><img alt="Query 5" src="../images/5.png" /></p>
1638 | <h3 id="6-find-all-classes-that-inherit-from-a-specific-class">6. Find all classes that inherit from a specific class</h3>
1639 | <ul>
1640 | <li><strong>Natural Language:</strong> "Show me all classes that inherit from <code>Base</code>."</li>
1641 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1642 | <li><strong>JSON Arguments:</strong></li>
1643 | </ul>
1644 | <pre><code class="language-json">{
1645 |   &quot;query_type&quot;: &quot;class_hierarchy&quot;,
1646 |   &quot;target&quot;: &quot;Base&quot;
1647 | }
1648 | </code></pre>
1649 | <ul>
1650 | <li><strong>Note:</strong> The response for <code>class_hierarchy</code> includes a list of child classes.</li>
1651 | </ul>
1652 | <p><img alt="Query 6" src="../images/6.png" /></p>
1653 | <h3 id="7-find-all-functions-with-a-specific-decorator">7. Find all functions with a specific decorator</h3>
1654 | <ul>
1655 | <li><strong>Natural Language:</strong> "Find all functions with the <code>log_decorator</code>."</li>
1656 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1657 | <li><strong>JSON Arguments:</strong></li>
1658 | </ul>
1659 | <pre><code class="language-json">{
1660 |   &quot;query_type&quot;: &quot;find_functions_by_decorator&quot;,
1661 |   &quot;target&quot;: &quot;log_decorator&quot;
1662 | }
1663 | </code></pre>
1664 | <p><img alt="Query 7" src="../images/7.png" /></p>
1665 | <h3 id="8-find-all-dataclasses">8. Find all dataclasses</h3>
1666 | <ul>
1667 | <li><strong>Natural Language:</strong> "Find all dataclasses."</li>
1668 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
1669 | <li><strong>JSON Arguments:</strong></li>
1670 | </ul>
1671 | <pre><code class="language-json">{
1672 |   &quot;cypher_query&quot;: &quot;MATCH (c:Class) WHERE 'dataclass' IN c.decorators RETURN c.name, c.file_path&quot;
1673 | }
1674 | </code></pre>
1675 | <p><img alt="Query 8" src="../images/8.png" /></p>
1676 | <hr />
1677 | <h2 id="code-analysis-quality">Code Analysis &amp; Quality</h2>
1678 | <h3 id="9-find-the-5-most-complex-functions">9. Find the 5 most complex functions</h3>
1679 | <ul>
1680 | <li><strong>Natural Language:</strong> "Find the 5 most complex functions."</li>
1681 | <li><strong>Tool:</strong> <code>find_most_complex_functions</code></li>
1682 | <li><strong>JSON Arguments:</strong></li>
1683 | </ul>
1684 | <pre><code class="language-json">{
1685 |   &quot;limit&quot;: 5
1686 | }
1687 | </code></pre>
1688 | <p><img alt="Query 9" src="../images/9.png" /></p>
1689 | <h3 id="10-calculate-cyclomatic-complexity-of-a-function">10. Calculate cyclomatic complexity of a function</h3>
1690 | <ul>
1691 | <li><strong>Natural Language:</strong> "What is the cyclomatic complexity of <code>try_except_finally</code>?"</li>
1692 | <li><strong>Tool:</strong> <code>calculate_cyclomatic_complexity</code></li>
1693 | <li><strong>JSON Arguments:</strong></li>
1694 | </ul>
1695 | <pre><code class="language-json">{
1696 |   &quot;function_name&quot;: &quot;try_except_finally&quot;
1697 | }
1698 | </code></pre>
1699 | <h3 id="11-find-unused-code">11. Find unused code</h3>
1700 | <ul>
1701 | <li><strong>Natural Language:</strong> "Find unused code, but ignore API endpoints decorated with <code>@app.route</code>."</li>
1702 | <li><strong>Tool:</strong> <code>find_dead_code</code></li>
1703 | <li><strong>JSON Arguments:</strong></li>
1704 | </ul>
1705 | <pre><code class="language-json">{
1706 |   &quot;exclude_decorated_with&quot;: [&quot;@app.route&quot;]
1707 | }
1708 | </code></pre>
1709 | <p><img alt="Query 11" src="../images/11.png" /></p>
1710 | <h3 id="12-find-the-call-chain-between-two-functions">12. Find the call chain between two functions</h3>
1711 | <ul>
1712 | <li><strong>Natural Language:</strong> "What is the call chain from <code>wrapper</code> to <code>helper</code>?"</li>
1713 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1714 | <li><strong>JSON Arguments:</strong></li>
1715 | </ul>
1716 | <pre><code class="language-json">{
1717 |   &quot;query_type&quot;: &quot;call_chain&quot;,
1718 |   &quot;target&quot;: &quot;wrapper-&gt;helper&quot;
1719 | }
1720 | </code></pre>
1721 | <p><img alt="Query 12" src="../images/12.png" /></p>
1722 | <h3 id="13-find-all-direct-and-indirect-callers-of-a-function">13. Find all direct and indirect callers of a function</h3>
1723 | <ul>
1724 | <li><strong>Natural Language:</strong> "Show me all functions that eventually call the <code>helper</code> function."</li>
1725 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1726 | <li><strong>JSON Arguments:</strong></li>
1727 | </ul>
1728 | <pre><code class="language-json">{
1729 |   &quot;query_type&quot;: &quot;find_all_callers&quot;,
1730 |   &quot;target&quot;: &quot;helper&quot;
1731 | }
1732 | </code></pre>
1733 | <p><img alt="Query 13" src="../images/13.png" /></p>
1734 | <h3 id="14-find-functions-by-argument-name">14. Find functions by argument name</h3>
1735 | <ul>
1736 | <li><strong>Natural Language:</strong> "Find all functions that take <code>self</code> as an argument."</li>
1737 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1738 | <li><strong>JSON Arguments:</strong></li>
1739 | </ul>
1740 | <pre><code class="language-json">{
1741 |   &quot;query_type&quot;: &quot;find_functions_by_argument&quot;,
1742 |   &quot;target&quot;: &quot;self&quot;
1743 | }
1744 | </code></pre>
1745 | <p><img alt="Query 14" src="../images/14.png" /></p>
1746 | <h3 id="15-list-all-python-package-imports-from-a-directory">15. List all python package imports from a directory</h3>
1747 | <ul>
1748 | <li><strong>Natural Language:</strong> "List all python package imports from my project directory."</li>
1749 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
1750 | <li><strong>JSON Arguments:</strong></li>
1751 | </ul>
1752 | <pre><code class="language-json">{
1753 |   &quot;cypher_query&quot;: &quot;MATCH (f:File)-[:IMPORTS]-&gt;(m:Module) WHERE f.path ENDS WITH '.py' RETURN DISTINCT m.name&quot;
1754 | }
1755 | </code></pre>
1756 | <hr />
1757 | <h2 id="repository-information-queries">Repository Information Queries</h2>
1758 | <h3 id="16-list-all-indexed-projects">16. List all indexed projects</h3>
1759 | <ul>
1760 | <li><strong>Natural Language:</strong> "List all projects I have indexed."</li>
1761 | <li><strong>Tool:</strong> <code>list_indexed_repositories</code></li>
1762 | <li><strong>JSON Arguments:</strong></li>
1763 | </ul>
1764 | <pre><code class="language-json">  {}
1765 | </code></pre>
1766 | <p><img alt="Query 16" src="../images/16.png" /></p>
1767 | <h3 id="17-check-the-status-of-an-indexing-job">17. Check the status of an indexing job</h3>
1768 | <ul>
1769 | <li><strong>Natural Language:</strong> "What is the status of job <code>4cb9a60e-c1b1-43a7-9c94-c840771506bc</code>?"</li>
1770 | <li><strong>Tool:</strong> <code>check_job_status</code></li>
1771 | <li><strong>JSON Arguments:</strong></li>
1772 | </ul>
1773 | <pre><code class="language-json">{
1774 |   &quot;job_id&quot;: &quot;4cb9a60e-c1b1-43a7-9c94-c840771506bc&quot;
1775 | }
1776 | </code></pre>
1777 | <h3 id="18-list-all-background-jobs">18. List all background jobs</h3>
1778 | <ul>
1779 | <li><strong>Natural Language:</strong> "Show me all background jobs."</li>
1780 | <li><strong>Tool:</strong> <code>list_jobs</code></li>
1781 | <li><strong>JSON Arguments:</strong></li>
1782 | </ul>
1783 | <pre><code class="language-json">  {}
1784 | </code></pre>
1785 | <hr />
1786 | <h2 id="advanced-cypher-queries">Advanced Cypher Queries</h2>
1787 | <p>These examples use the <code>execute_cypher_query</code> tool for more specific and complex questions.</p>
1788 | <h3 id="19-find-all-function-definitions">19. Find all function definitions</h3>
1789 | <ul>
1790 | <li><strong>Natural Language:</strong> "Find all function definitions in the codebase."</li>
1791 | <li><strong>JSON Arguments:</strong></li>
1792 | </ul>
1793 | <pre><code class="language-json">{
1794 |   &quot;cypher_query&quot;: &quot;MATCH (n:Function) RETURN n.name, n.file_path, n.line_number LIMIT 50&quot;
1795 | }
1796 | </code></pre>
1797 | <p><img alt="Query 19" src="../images/19.png" /></p>
1798 | <h3 id="20-find-all-classes">20. Find all classes</h3>
1799 | <ul>
1800 | <li><strong>Natural Language:</strong> "Show me all the classes."</li>
1801 | <li><strong>JSON Arguments:</strong></li>
1802 | </ul>
1803 | <pre><code class="language-json">{
1804 |   &quot;cypher_query&quot;: &quot;MATCH (n:Class) RETURN n.name, n.file_path, n.line_number LIMIT 50&quot;
1805 | }
1806 | </code></pre>
1807 | <p><img alt="Query 20" src="../images/20.png" /></p>
1808 | <h3 id="21-find-all-functions-in-a-file">21. Find all functions in a file</h3>
1809 | <ul>
1810 | <li><strong>Natural Language:</strong> "Find all functions in <code>module_a.py</code>."</li>
1811 | <li><strong>JSON Arguments:</strong></li>
1812 | </ul>
1813 | <pre><code class="language-json">{
1814 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function) WHERE f.file_path ENDS WITH 'module_a.py' RETURN f.name&quot;
1815 | }
1816 | </code></pre>
1817 | <p><img alt="Query 21" src="../images/21.png" /></p>
1818 | <h3 id="22-find-all-classes-in-a-file">22. Find all classes in a file</h3>
1819 | <ul>
1820 | <li><strong>Natural Language:</strong> "Find all classes in <code>advanced_classes.py</code>."</li>
1821 | <li><strong>JSON Arguments:</strong></li>
1822 | </ul>
1823 | <pre><code class="language-json">{
1824 |   &quot;cypher_query&quot;: &quot;MATCH (c:Class) WHERE c.file_path ENDS WITH 'advanced_classes.py' RETURN c.name&quot;
1825 | }
1826 | </code></pre>
1827 | <p><img alt="Query 22" src="../images/22.png" /></p>
1828 | <h3 id="23-list-all-top-level-functions-and-classes-in-a-file">23. List all top-level functions and classes in a file</h3>
1829 | <ul>
1830 | <li><strong>Natural Language:</strong> "List all top-level functions and classes in <code>module_a.py</code>."</li>
1831 | <li><strong>JSON Arguments:</strong></li>
1832 | </ul>
1833 | <pre><code class="language-json">{
1834 |   &quot;cypher_query&quot;: &quot;MATCH (f:File)-[:CONTAINS]-&gt;(n) WHERE f.name = 'module_a.py' AND (n:Function OR n:Class) AND n.context IS NULL RETURN n.name&quot;
1835 | }
1836 | </code></pre>
1837 | <p><img alt="Query 23" src="../images/23.png" /></p>
1838 | <h3 id="24-find-functions-in-one-module-that-call-a-function-in-another">24. Find functions in one module that call a function in another</h3>
1839 | <ul>
1840 | <li><strong>Natural Language:</strong> "Find functions in <code>module_a.py</code> that call <code>helper</code> in <code>module_b.py</code>."</li>
1841 | <li><strong>JSON Arguments:</strong></li>
1842 | </ul>
1843 | <pre><code class="language-json">{
1844 |   &quot;cypher_query&quot;: &quot;MATCH (caller:Function)-[:CALLS]-&gt;(callee:Function {name: 'helper'}) WHERE caller.file_path ENDS WITH 'module_a.py' AND callee.file_path ENDS WITH 'module_b.py' RETURN caller.name&quot;
1845 | }
1846 | </code></pre>
1847 | <p><img alt="Query 24" src="../images/24.png" /></p>
1848 | <h3 id="25-find-circular-file-imports">25. Find circular file imports</h3>
1849 | <ul>
1850 | <li><strong>Natural Language:</strong> "Are there any circular dependencies between files?"</li>
1851 | <li><strong>JSON Arguments:</strong></li>
1852 | </ul>
1853 | <pre><code class="language-json">{
1854 |   &quot;cypher_query&quot;: &quot;MATCH (f1:File)-[:IMPORTS]-&gt;(m2:Module), (f2:File)-[:IMPORTS]-&gt;(m1:Module) WHERE f1.name = m1.name + '.py' AND f2.name = m2.name + '.py' RETURN f1.name, f2.name&quot;
1855 | }
1856 | </code></pre>
1857 | <h3 id="26-find-all-functions-with-more-than-5-arguments">26. Find all functions with more than 5 arguments</h3>
1858 | <ul>
1859 | <li><strong>Natural Language:</strong> "Find all functions with a large number of arguments."</li>
1860 | <li><strong>JSON Arguments:</strong></li>
1861 | </ul>
1862 | <pre><code class="language-json">{
1863 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function) WHERE size(f.args) &gt; 5 RETURN f.name, f.file_path, size(f.args) as arg_count&quot;
1864 | }
1865 | </code></pre>
1866 | <p><img alt="Query 26" src="../images/26.png" /></p>
1867 | <h3 id="27-find-all-functions-in-a-file-that-have-a-docstring">27. Find all functions in a file that have a docstring</h3>
1868 | <ul>
1869 | <li><strong>Natural Language:</strong> "Find all functions in <code>module_a.py</code> that have a docstring."</li>
1870 | <li><strong>JSON Arguments:</strong></li>
1871 | </ul>
1872 | <pre><code class="language-json">{
1873 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function) WHERE f.file_path ENDS WITH 'module_a.py' AND f.docstring IS NOT NULL AND f.docstring &lt;&gt; '' RETURN f.name&quot;
1874 | }
1875 | </code></pre>
1876 | <h3 id="28-find-all-classes-that-have-a-specific-method">28. Find all classes that have a specific method</h3>
1877 | <ul>
1878 | <li><strong>Natural Language:</strong> "Find all classes that have a <code>greet</code> method."</li>
1879 | <li><strong>JSON Arguments:</strong></li>
1880 | </ul>
1881 | <pre><code class="language-json">{
1882 |   &quot;cypher_query&quot;: &quot;MATCH (c:Class)-[:CONTAINS]-&gt;(m:Function {name: 'greet'}) RETURN c.name, c.file_path&quot;
1883 | }
1884 | </code></pre>
1885 | <p><img alt="Query 28" src="../images/28.png" /></p>
1886 | <h3 id="29-find-the-depth-of-inheritance-for-all-classes">29. Find the depth of inheritance for all classes</h3>
1887 | <ul>
1888 | <li><strong>Natural Language:</strong> "How deep are the inheritance chains for all classes?"</li>
1889 | <li><strong>JSON Arguments:</strong></li>
1890 | </ul>
1891 | <pre><code class="language-json">{
1892 |   &quot;cypher_query&quot;: &quot;MATCH (c:Class) OPTIONAL MATCH path = (c)-[:INHERITS*]-&gt;(parent:Class) RETURN c.name, c.file_path, length(path) AS depth ORDER BY depth DESC&quot;
1893 | }
1894 | </code></pre>
1895 | <p><img alt="Query 29" src="../images/29.png" /></p>
1896 | <h3 id="30-find-all-functions-that-have-a-docstring">30. Find all functions that have a docstring</h3>
1897 | <ul>
1898 | <li><strong>Natural Language:</strong> "Show me all functions that are documented."</li>
1899 | <li><strong>JSON Arguments:</strong></li>
1900 | </ul>
1901 | <pre><code class="language-json">{
1902 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function) WHERE f.docstring IS NOT NULL AND f.docstring &lt;&gt; '' RETURN f.name, f.file_path LIMIT 50&quot;
1903 | }
1904 | </code></pre>
1905 | <p><img alt="Query 30" src="../images/30.png" /></p>
1906 | <h3 id="31-find-all-decorated-methods-in-a-class">31. Find all decorated methods in a class</h3>
1907 | <ul>
1908 | <li><strong>Natural Language:</strong> "Find all decorated methods in the <code>Child</code> class."</li>
1909 | <li><strong>JSON Arguments:</strong></li>
1910 | </ul>
1911 | <pre><code class="language-json">{
1912 |   &quot;cypher_query&quot;: &quot;MATCH (c:Class {name: 'Child'})-[:CONTAINS]-&gt;(m:Function) WHERE m.decorators IS NOT NULL AND size(m.decorators) &gt; 0 RETURN m.name&quot;
1913 | }
1914 | </code></pre>
1915 | <p><img alt="Query 31" src="../images/31.png" /></p>
1916 | <h3 id="32-find-the-number-of-functions-in-each-file">32. Find the number of functions in each file</h3>
1917 | <ul>
1918 | <li><strong>Natural Language:</strong> "How many functions are in each file?"</li>
1919 | <li><strong>JSON Arguments:</strong></li>
1920 | </ul>
1921 | <pre><code class="language-json">{
1922 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function) RETURN f.file_path, count(f) AS function_count ORDER BY function_count DESC&quot;
1923 | }
1924 | </code></pre>
1925 | <p><img alt="Query 32" src="../images/32.png" /></p>
1926 | <h3 id="33-find-all-methods-that-override-a-parent-method">33. Find all methods that override a parent method</h3>
1927 | <ul>
1928 | <li><strong>Natural Language:</strong> "Find all methods that are overridden from a parent class."</li>
1929 | <li><strong>JSON Arguments:</strong></li>
1930 | </ul>
1931 | <pre><code class="language-json">{
1932 |   &quot;cypher_query&quot;: &quot;MATCH (c:Class)-[:INHERITS]-&gt;(p:Class), (c)-[:CONTAINS]-&gt;(m:Function), (p)-[:CONTAINS]-&gt;(m_parent:Function) WHERE m.name = m_parent.name RETURN m.name as method, c.name as child_class, p.name as parent_class&quot;
1933 | }
1934 | </code></pre>
1935 | <p><img alt="Query 33" src="../images/33.png" /></p>
1936 | <h3 id="34-find-all-functions-that-call-super">34. Find all functions that call <code>super()</code></h3>
1937 | <ul>
1938 | <li><strong>Natural Language:</strong> "Find all methods that call their parent's method via <code>super()</code>."</li>
1939 | <li><strong>JSON Arguments:</strong></li>
1940 | </ul>
1941 | <pre><code class="language-json">{
1942 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function)-[r:CALLS]-&gt;() WHERE r.full_call_name STARTS WITH 'super(' RETURN f.name, f.file_path&quot;
1943 | }
1944 | </code></pre>
1945 | <p><img alt="Query 34" src="../images/34.png" /></p>
1946 | <h3 id="35-find-all-calls-to-a-function-with-a-specific-argument">35. Find all calls to a function with a specific argument</h3>
1947 | <ul>
1948 | <li><strong>Natural Language:</strong> "Find all calls to <code>helper</code> with the argument <code>x</code>."</li>
1949 | <li><strong>JSON Arguments:</strong></li>
1950 | </ul>
1951 | <pre><code class="language-json">{
1952 |   &quot;cypher_query&quot;: &quot;MATCH ()-[r:CALLS]-&gt;(f:Function {name: 'helper'}) WHERE 'x' IN r.args RETURN r.full_call_name, r.line_number, r.file_path&quot;
1953 | }
1954 | </code></pre>
1955 | <p><img alt="Query 35" src="../images/35.png" /></p>
1956 | <h3 id="36-find-all-functions-that-are-not-called-by-any-other-function">36. Find all functions that are not called by any other function</h3>
1957 | <ul>
1958 | <li><strong>Natural Language:</strong> "Find all dead code (functions that are never called)."</li>
1959 | <li><strong>JSON Arguments:</strong></li>
1960 | </ul>
1961 | <pre><code class="language-json">{
1962 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function) WHERE NOT (()-[:CALLS]-&gt;(f)) AND f.is_dependency = false RETURN f.name, f.file_path&quot;
1963 | }
1964 | </code></pre>
1965 | <p><img alt="Query 36" src="../images/36.png" /></p>
1966 | <h3 id="37-find-all-functions-that-are-called-with-a-specific-argument">37. Find all functions that are called with a specific argument</h3>
1967 | <ul>
1968 | <li><strong>Natural Language:</strong> "Find all calls to <code>print</code> with the argument <code>'hello'</code>."</li>
1969 | <li><strong>JSON Arguments:</strong></li>
1970 | </ul>
1971 | <pre><code class="language-json">{
1972 |   &quot;cypher_query&quot;: &quot;MATCH (c:Call) WHERE c.name = 'print' AND 'hello' IN c.args RETURN c.file, c.lineno&quot;
1973 | }
1974 | </code></pre>
1975 | <h3 id="38-find-all-direct-and-indirect-callees-of-a-function">38. Find all direct and indirect callees of a function</h3>
1976 | <ul>
1977 | <li><strong>Natural Language:</strong> "Show me all functions that are eventually called by the <code>foo</code> function."</li>
1978 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1979 | <li><strong>JSON Arguments:</strong></li>
1980 | </ul>
1981 | <pre><code class="language-json">{
1982 |   &quot;query_type&quot;: &quot;find_all_callees&quot;,
1983 |   &quot;target&quot;: &quot;foo&quot;,
1984 |   &quot;context&quot;: &quot;/teamspace/studios/this_studio/demo/CodeGraphContext/tests/sample_project/module_a.py&quot;
1985 | }
1986 | </code></pre>
1987 | <p><img alt="Query 38" src="../images/38.png" /></p>
1988 | <h3 id="39-find-all-functions-that-are-overridden">39. Find all functions that are overridden</h3>
1989 | <ul>
1990 | <li><strong>Natural Language:</strong> "Find all functions that are overridden."</li>
1991 | <li><strong>Tool:</strong> <code>analyze_code_relationships</code></li>
1992 | <li><strong>JSON Arguments:</strong></li>
1993 | </ul>
1994 | <pre><code class="language-json">{
1995 |   &quot;query_type&quot;: &quot;overrides&quot;,
1996 |   &quot;target&quot;: &quot;foo&quot;
1997 | }
1998 | </code></pre>
1999 | <p><img alt="Query 39" src="../images/39.png" /></p>
2000 | <h3 id="40-find-all-modules-imported-by-module_a">40. Find all modules imported by <code>module_a</code></h3>
2001 | <ul>
2002 | <li><strong>Natural Language:</strong> "Find all modules imported by <code>module_a</code>."</li>
2003 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
2004 | <li><strong>JSON Arguments:</strong></li>
2005 | </ul>
2006 | <pre><code class="language-json">{
2007 |   &quot;cypher_query&quot;: &quot;MATCH (f:File {name: 'module_a.py'})-[:IMPORTS]-&gt;(m:Module) RETURN m.name AS imported_module_name&quot;
2008 | }
2009 | </code></pre>
2010 | <p><img alt="Query 40" src="../images/40.png" /></p>
2011 | <h3 id="41-find-large-functions-that-should-be-refactored">41. Find large functions that should be refactored</h3>
2012 | <ul>
2013 | <li><strong>Natural Language:</strong> "Find functions with more than 20 lines of code that might need refactoring."</li>
2014 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
2015 | <li><strong>JSON Arguments:</strong></li>
2016 | </ul>
2017 | <pre><code class="language-json">{
2018 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function)\n    WHERE f.end_line - f.line_number &gt; 20\n    RETURN f&quot;
2019 | }
2020 | </code></pre>
2021 | <p><img alt="Query 41" src="../images/41.png" /></p>
2022 | <h3 id="42-find-recursive-functions">42. Find recursive functions</h3>
2023 | <ul>
2024 | <li><strong>Natural Language:</strong> "Find all functions that call themselves (recursive functions)."</li>
2025 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
2026 | <li><strong>JSON Arguments:</strong></li>
2027 | </ul>
2028 | <pre><code class="language-json">{
2029 |   &quot;cypher_query&quot;: &quot;MATCH p=(f:Function)-[:CALLS]-&gt;(f2:Function)\n    WHERE f.name = f2.name AND f.file_path = f2.file_path\n    RETURN p&quot;
2030 | }
2031 | </code></pre>
2032 | <p><img alt="Query 42" src="../images/42.png" /></p>
2033 | <h3 id="43-find-most-connected-functions-hub-functions">43. Find most connected functions (hub functions)</h3>
2034 | <ul>
2035 | <li><strong>Natural Language:</strong> "Find the functions that are most central to the codebase (called by many and call many others)."</li>
2036 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
2037 | <li><strong>JSON Arguments:</strong></li>
2038 | </ul>
2039 | <pre><code class="language-json">{
2040 |   &quot;cypher_query&quot;: &quot;MATCH (f:Function)\n    OPTIONAL MATCH (f)-[:CALLS]-&gt;(callee:Function)\n    OPTIONAL MATCH (caller:Function)-[:CALLS]-&gt;(f)\n    WITH f, count(DISTINCT callee) AS calls_out, count(DISTINCT caller) AS calls_in\n    ORDER BY (calls_out + calls_in) DESC\n    LIMIT 5\n    MATCH p=(f)-[*0..2]-()\n    RETURN p&quot;
2041 | }
2042 | </code></pre>
2043 | <p><img alt="Query 43" src="../images/43.png" /></p>
2044 | <h2 id="security-sensitive-data-analysis">Security &amp; Sensitive Data Analysis</h2>
2045 | <h3 id="44-find-potential-security-vulnerabilities-hardcoded-secrets">44. Find potential security vulnerabilities (hardcoded secrets)</h3>
2046 | <ul>
2047 | <li><strong>Natural Language:</strong> "Find potential hardcoded passwords, API keys, or secrets in the codebase."</li>
2048 | <li><strong>Tool:</strong> <code>execute_cypher_query</code></li>
2049 | <li><strong>JSON Arguments:</strong></li>
2050 | </ul>
2051 | <pre><code class="language-json">{
2052 |   &quot;cypher_query&quot;: &quot;WITH [\&quot;password\&quot;,  \&quot;api_key\&quot;, \&quot;apikey\&quot;,    \&quot;secret_token\&quot;, \&quot;token\&quot;, \&quot;auth\&quot;, \&quot;access_key\&quot;, \&quot;private_key\&quot;, \&quot;client_secret\&quot;, \&quot;sessionid\&quot;, \&quot;jwt\&quot;] AS keywords\n    MATCH (f:Function)\n    WHERE ANY(word IN keywords WHERE toLower(f.source_code) CONTAINS word)\n    RETURN f&quot;
2053 | }
2054 | </code></pre>
2055 | 
2056 | 
2057 | 
2058 | 
2059 | 
2060 | 
2061 | 
2062 | 
2063 | 
2064 | 
2065 | 
2066 | 
2067 |                 
2068 |               </article>
2069 |             </div>
2070 |           
2071 |           
2072 | <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
2073 |         </div>
2074 |         
2075 |       </main>
2076 |       
2077 |         <footer class="md-footer">
2078 |   
2079 |   <div class="md-footer-meta md-typeset">
2080 |     <div class="md-footer-meta__inner md-grid">
2081 |       <div class="md-copyright">
2082 |   
2083 |   
2084 |     Made with
2085 |     <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2086 |       Material for MkDocs
2087 |     </a>
2088 |   
2089 | </div>
2090 |       
2091 |     </div>
2092 |   </div>
2093 | </footer>
2094 |       
2095 |     </div>
2096 |     <div class="md-dialog" data-md-component="dialog">
2097 |       <div class="md-dialog__inner md-typeset"></div>
2098 |     </div>
2099 |     
2100 |     
2101 |     
2102 |       
2103 |       <script id="__config" type="application/json">{"base": "..", "features": [], "search": "../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
2104 |     
2105 |     
2106 |       <script src="../assets/javascripts/bundle.f55a23d4.min.js"></script>
2107 |       
2108 |     
2109 |   </body>
2110 | </html>
```
Page 15/18FirstPrevNextLast