Code Pathfinder
v2.1.1Code intelligence MCP server: call graphs, type inference, and symbol search for Python/Go.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_index_info
Get comprehensive statistics about the indexed codebase (Python, Go, Java). Use this FIRST to understand the project scope before making other queries. Returns: - Project info: project_path, python_version, indexed_at, build_time_seconds - Overall stats: total_symbols, call_edges, modules, files, taint_summaries, class_fields - symbols_by_type: Breakdown by all 13 Python types (function_definition, method, constructor, property, special_method, class_definition, interface, enum, dataclass, module_variable, constant, class_field, parameter) - symbols_by_lsp_kind: Breakdown by LSP Symbol Kind (…
find_symbol
Search and filter symbols by name and/or type. Supports Python, Go, and Java. Supports partial matching. Results are paginated. Symbol Types Available: - Python Functions: function_definition, method, constructor, property, special_method - Python Classes: class_definition, interface (Protocol/ABC), enum, dataclass - Python Variables: module_variable, constant (UPPERCASE), class_field, parameter - Go Functions: function_declaration, init_function, method, func_literal - Go Types: struct_definition, interface, type_alias - Go Variables: package_variable, constant, variable_assignment Returns:…
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor from previous response |
limit | integer | Max results to return (default: 50, max: 500) |
module | string | Filter by module. Optional. Matches symbols whose FQN starts with the module path (e.g., 'core.settings', 'data_manager.models'). Works with all symbol types |
name | string | Symbol name to find. Optional. Can be: short name ('login'), partial name ('auth'), or FQN ('myapp.auth.login') |
type | string | Filter by single symbol type. Optional. One of: function_definition, method, constructor, property, special_method, class_definition, interface, enum, dataclass, module_variable, constant, class_field… |
types | array | Filter by multiple symbol types. Optional. Array of type strings. Alternative to 'type' parameter |
find_module
Search for Python modules by name. Returns module information including file path and symbol counts. Returns: module_fqn, file_path, functions_count (number of functions/methods in the module), and match_type (exact/partial). Use when: Finding module locations, understanding module structure, or navigating between modules. Examples: - find_module("myapp.auth") - find the auth module - find_module("utils") - find all modules named utils - find_module("models.user") - find user module in models package
| Parameter | Type | Description |
|---|---|---|
name * | string | Module name to find. Can be FQN ('myapp.auth') or short name ('auth') |
list_modules
List all Python modules in the indexed project. Returns comprehensive module information. Returns: Array of modules with module_fqn, file_path, and functions_count for each. Includes total_modules count. Use when: Exploring project structure, getting an overview of all modules, or discovering what modules exist. Examples: - list_modules() - get all modules in the project
get_callers
Find all functions that CALL a given function (reverse call graph / incoming edges). Answer: "Who uses this function?" Results are paginated. Returns: Target function info and list of callers with their FQN, file, line number, and the specific call site location. Includes pagination info. IMPORTANT - Function Parameter Requirements: - Must be a FUNCTION or METHOD name, NOT a module path - Use find_symbol first to get the exact FQN of functions - Short names work ("sanitize_input") if unique in the codebase - Full FQNs are preferred ("myapp.utils.sanitize_input") to avoid ambiguity - Method n…
| Parameter | Type | Description |
|---|---|---|
function * | string | Function to find callers for. Use short name ('login') or FQN ('myapp.auth.login') |
cursor | string | Pagination cursor from previous response |
limit | integer | Max results to return (default: 50, max: 500) |
get_callees
Find all functions CALLED BY a given function (forward call graph / outgoing edges). Answer: "What does this function depend on?" Results are paginated. Returns: Source function info, list of callees with target name, call line, resolution status (resolved/unresolved), and type inference info if available. Includes pagination info. IMPORTANT - Function Parameter Requirements: - Must be a FUNCTION or METHOD name, NOT a module path - Use find_symbol first to get the exact FQN of the function you want to analyze - Short names work ("process_payment") if the function name is unique - Full FQNs a…
| Parameter | Type | Description |
|---|---|---|
function * | string | Function to find callees for. Use short name ('process') or FQN ('myapp.payment.process') |
cursor | string | Pagination cursor from previous response |
limit | integer | Max results to return (default: 50, max: 500) |
get_call_details
Get detailed information about a SPECIFIC call from one function to another. Most detailed view of a single call site. Returns: Full call site info including caller FQN, target, exact location (file, line, column), arguments passed, and resolution details (resolved status, failure reason if unresolved, type inference info). Use when: Investigating a specific function call, understanding how arguments are passed, debugging why a call wasn't resolved, or analyzing type inference. Examples: - get_call_details("handle_request", "authenticate") - how does handle_request call authenticate? - get_…
| Parameter | Type | Description |
|---|---|---|
callee * | string | The function being called (short name, will match partially) |
caller * | string | The function making the call (short name or FQN) |
resolve_import
Resolve a Python import path to its actual file location in the project. Returns: Import resolution with file_path, module_fqn, match_type (exact/short_name/partial/ambiguous), and alternatives if multiple matches exist. Use when: Finding where a module is defined, understanding import structure, or locating source files for external references. Examples: - resolve_import("myapp.auth.users") - find the users module - resolve_import("utils") - find modules named utils (may return multiple) - resolve_import("database") - locate database module
| Parameter | Type | Description |
|---|---|---|
import * | string | Import path to resolve. Can be FQN ('myapp.auth.users') or short name ('users') |
find_dockerfile_instructions
Search Dockerfile instructions with semantic filtering. Supports instruction-specific filters (has_digest for FROM, user for USER, port for EXPOSE). Returns: - file, line, instruction, raw_content - Parsed details (base_image, tag, digest for FROM; user, group for USER; port, protocol for EXPOSE) Use when: Finding specific instructions, locating images, analyzing exposed ports, or understanding Dockerfile structure. Examples: - find_dockerfile_instructions(instruction_type="FROM", has_digest=false) - find unpinned base images - find_dockerfile_instructions(instruction_type="USER", user="app…
| Parameter | Type | Description |
|---|---|---|
base_image | string | Filter FROM instructions by base image name (e.g., 'python', 'alpine') |
file_path | string | Filter by Dockerfile path (supports partial matching) |
has_digest | boolean | Filter FROM instructions by digest pinning (true=pinned, false=unpinned) |
instruction_type | string | Filter by instruction type (FROM, RUN, USER, EXPOSE, COPY, ADD, WORKDIR, etc.) |
limit | integer | Maximum results to return (default: 100) |
port | integer | Filter EXPOSE instructions by port number |
user | string | Filter USER instructions by username |
find_compose_services
Search docker-compose services with filtering. Supports configuration filters (has_privileged, has_volume, exposes_port). Returns: - service_name, file, line - Configuration (image, build, ports, volumes, environment, privileged, network_mode) Use when: Finding specific services, analyzing service configurations, or understanding multi-container architecture. Examples: - find_compose_services(has_privileged=true) - find privileged containers - find_compose_services(has_volume="/var/run/docker.sock") - find services with Docker socket - find_compose_services(exposes_port=8080) - find service…
| Parameter | Type | Description |
|---|---|---|
exposes_port | integer | Filter services exposing specific port |
file_path | string | Filter by docker-compose.yml path |
has_privileged | boolean | Filter by privileged mode (true=privileged containers only) |
has_volume | string | Filter services with specific volume path (e.g., '/var/run/docker.sock') |
limit | integer | Maximum results to return (default: 100) |
service_name | string | Filter by service name (supports partial matching) |
get_dockerfile_details
Get complete breakdown of a Dockerfile with all instructions and multi-stage analysis. Returns: - file, total_instructions - instructions: Array of parsed instructions with details - multi_stage: is_multi_stage, base_image, stages (array of stage aliases) - summary: has_user_instruction, has_healthcheck, unpinned_images Use when: Understanding complete Dockerfile structure, analyzing multi-stage builds, or reviewing all instructions. Examples: - get_dockerfile_details(file_path="/app/Dockerfile") - get complete Dockerfile breakdown - get_dockerfile_details(file_path="Dockerfile") - analyze…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to Dockerfile (required) |
status
Returns the current server state: indexing phase, progress, and readiness. Use when: Checking whether the index is ready before making queries, or diagnosing slow startup. Returns: state (uninitialized/indexing/ready/failed), progress details, stats (when ready), and optional update-check fields (latest_version, update_message, announcement) when a newer version or operator announcement is available.
get_docker_dependencies
Retrieves dependency information for Docker entities (compose services or Dockerfile stages). Use cases: - Map docker-compose service dependencies (depends_on relationships) - Analyze multi-stage Dockerfile build dependencies (COPY --from) - Traverse upstream/downstream dependency chains Examples: - get_docker_dependencies(type="compose", name="web") - find all dependencies for "web" service - get_docker_dependencies(type="dockerfile", name="builder", file_path="Dockerfile") - find stage dependencies - get_docker_dependencies(type="compose", name="api", direction="upstream", max_depth=2) - u…
| Parameter | Type | Description |
|---|---|---|
name * | string | Entity name: service name (for compose) or stage name/alias (for dockerfile) |
type * | string | Entity type: "compose" for docker-compose services or "dockerfile" for Dockerfile stages |
direction | string | Traversal direction: "upstream", "downstream", or "both" (default: "both") |
file_path | string | Optional: Filter to specific file path |
max_depth | integer | Maximum traversal depth (default: 10) |