Code Pathfinder

v2.1.1
dev.codepathfinder/pathfinder Checked 11 hours ago Published 7 months ago

Code 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:…

ParameterTypeDescription
cursorstringPagination cursor from previous response
limitintegerMax results to return (default: 50, max: 500)
modulestringFilter by module. Optional. Matches symbols whose FQN starts with the module path (e.g., 'core.settings', 'data_manager.models'). Works with all symbol types
namestringSymbol name to find. Optional. Can be: short name ('login'), partial name ('auth'), or FQN ('myapp.auth.login')
typestringFilter by single symbol type. Optional. One of: function_definition, method, constructor, property, special_method, class_definition, interface, enum, dataclass, module_variable, constant, class_field…
typesarrayFilter 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

ParameterTypeDescription
name *stringModule 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…

ParameterTypeDescription
function *stringFunction to find callers for. Use short name ('login') or FQN ('myapp.auth.login')
cursorstringPagination cursor from previous response
limitintegerMax 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…

ParameterTypeDescription
function *stringFunction to find callees for. Use short name ('process') or FQN ('myapp.payment.process')
cursorstringPagination cursor from previous response
limitintegerMax 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_…

ParameterTypeDescription
callee *stringThe function being called (short name, will match partially)
caller *stringThe 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

ParameterTypeDescription
import *stringImport 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…

ParameterTypeDescription
base_imagestringFilter FROM instructions by base image name (e.g., 'python', 'alpine')
file_pathstringFilter by Dockerfile path (supports partial matching)
has_digestbooleanFilter FROM instructions by digest pinning (true=pinned, false=unpinned)
instruction_typestringFilter by instruction type (FROM, RUN, USER, EXPOSE, COPY, ADD, WORKDIR, etc.)
limitintegerMaximum results to return (default: 100)
portintegerFilter EXPOSE instructions by port number
userstringFilter 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…

ParameterTypeDescription
exposes_portintegerFilter services exposing specific port
file_pathstringFilter by docker-compose.yml path
has_privilegedbooleanFilter by privileged mode (true=privileged containers only)
has_volumestringFilter services with specific volume path (e.g., '/var/run/docker.sock')
limitintegerMaximum results to return (default: 100)
service_namestringFilter 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…

ParameterTypeDescription
file_path *stringPath 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…

ParameterTypeDescription
name *stringEntity name: service name (for compose) or stage name/alias (for dockerfile)
type *stringEntity type: "compose" for docker-compose services or "dockerfile" for Dockerfile stages
directionstringTraversal direction: "upstream", "downstream", or "both" (default: "both")
file_pathstringOptional: Filter to specific file path
max_depthintegerMaximum traversal depth (default: 10)