Overview
Code Pathfinder exposes 12 MCP tools to AI assistants — 8 for code intelligence (Python, Java, Go) and 4 for Docker analysis (Dockerfiles, docker-compose).
All tools support pagination via limit and cursor parameters where applicable.
Quick Reference
| # | Tool | Category | Description |
|---|---|---|---|
| 1 | get_index_info | Code | Codebase statistics and index health |
| 2 | find_symbol | Code | Search symbols by name, type, or module |
| 3 | find_module | Code | Search Python modules by name |
| 4 | list_modules | Code | List all modules in the project |
| 5 | get_callers | Code | Reverse call graph — who calls this? |
| 6 | get_callees | Code | Forward call graph — what does this call? |
| 7 | get_call_details | Code | Detailed call site between two functions |
| 8 | resolve_import | Code | Resolve Python imports to file locations |
| 9 | find_dockerfile_instructions | Docker | Search Dockerfile instructions |
| 10 | find_compose_services | Docker | Search docker-compose services |
| 11 | get_dockerfile_details | Docker | Full Dockerfile breakdown |
| 12 | get_docker_dependencies | Docker | Docker entity dependency graph |
Tool 1: get_index_info
Retrieves project statistics and index metadata. Use this at the start of analysis to understand project scope.
Purpose
- Get high-level project overview
- Check if indexing is complete
- Retrieve build performance metrics
- Understand codebase scale
Input Parameters
None required.
Response Schema
Example
User Query:
Get project information and stats
AI Response:
Tool 2: find_symbol
Locates functions, classes, or methods by name with partial matching support.
Purpose
- Find symbols by name (exact or fuzzy)
- Discover functions matching a pattern
- Get symbol metadata (types, decorators, parameters)
- Navigate to symbol definitions
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Symbol name or pattern to search for |
limit | integer | No | Max results to return (default: 20) |
cursor | string | No | Pagination cursor for next page |
Response Schema
Example Queries
Example Response
Tool 3: get_callers
Identifies all functions that invoke a target function (reverse call graph analysis). Answers "Who uses this function?"
Purpose
- Find all callers of a function
- Understand function usage
- Identify impact of changes
- Trace backwards in call graph
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
function_fqn | string | Yes | Fully qualified name of target function |
limit | integer | No | Max results to return (default: 20) |
cursor | string | No | Pagination cursor for next page |
Response Schema
Example Queries
Example Response
Tool 4: get_callees
Lists all functions invoked by a given function (forward call graph). Answers "What does this function depend on?"
Purpose
- Find function dependencies
- Understand what a function calls
- Trace forward in call graph
- Analyze function complexity
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
function_fqn | string | Yes | Fully qualified name of source function |
limit | integer | No | Max results to return (default: 20) |
cursor | string | No | Pagination cursor for next page |
Response Schema
Example Queries
Example Response
Tool 5: get_call_details
Provides granular information about a specific call between two functions.
Purpose
- Get precise call site locations
- Analyze call arguments
- Understand type resolution
- Debug specific call relationships
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
caller_fqn | string | Yes | Fully qualified name of caller function |
callee_fqn | string | Yes | Fully qualified name of callee function |
Response Schema
Example Queries
Example Response
Tool 6: resolve_import
Maps Python import paths to actual file locations.
Purpose
- Resolve import statements
- Find module file paths
- Handle ambiguous imports
- Navigate import chains
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
import_path | string | Yes | Import path to resolve (e.g., "app.auth") |
Response Schema
Example Queries
Example Response
Tool 7: find_module
Search for Python modules by name. Returns module information including file path and function counts.
Purpose
- Find module file locations
- Understand module structure and size
- Navigate between modules
- Discover modules by partial name
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Module name — FQN (myapp.auth) or short name (auth) |
Example Queries
Example Response
Tool 8: list_modules
List all modules in the indexed project with their file paths and function counts.
Purpose
- Get a complete overview of project modules
- Understand project structure
- Find the largest/most complex modules
Input Parameters
None required.
Example Queries
Tool 9: find_dockerfile_instructions
Search Dockerfile instructions with semantic filtering. Supports instruction-specific filters for FROM, RUN, USER, EXPOSE, COPY, ADD, and more.
Purpose
- Find unpinned base images (
has_digest: false) - Locate specific instruction types
- Audit exposed ports
- Check USER directives for non-root enforcement
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
instruction_type | string | No | Filter by type: FROM, RUN, USER, EXPOSE, COPY, ADD, WORKDIR, etc. |
file_path | string | No | Filter by Dockerfile path (partial matching) |
base_image | string | No | Filter FROM instructions by base image name (e.g., python, alpine) |
port | integer | No | Filter EXPOSE instructions by port number |
has_digest | boolean | No | Filter FROM instructions by digest pinning (true = pinned, false = unpinned) |
user | string | No | Filter USER instructions by username |
limit | integer | No | Max results (default: 100) |
Example Queries
Example Response
Tool 10: find_compose_services
Search docker-compose services with configuration filters. Find services by name, privileged mode, volumes, or exposed ports.
Purpose
- Find privileged containers (security risk)
- Locate services exposing specific ports
- Find services mounting sensitive volumes (e.g., Docker socket)
- Audit service configurations
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_name | string | No | Filter by service name (partial matching) |
file_path | string | No | Filter by docker-compose.yml path |
has_privileged | boolean | No | Filter by privileged mode (true = privileged only) |
exposes_port | integer | No | Filter services exposing a specific port |
has_volume | string | No | Filter services with a specific volume path |
limit | integer | No | Max results (default: 100) |
Example Queries
Example Response
Tool 11: get_dockerfile_details
Get a complete breakdown of a single Dockerfile with all instructions and multi-stage build analysis.
Purpose
- Understand full Dockerfile structure
- Analyze multi-stage build dependencies
- Check for security best practices (USER, HEALTHCHECK)
- Identify unpinned images
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | Yes | Path to the Dockerfile |
Example Queries
Example Response
Tool 12: get_docker_dependencies
Retrieve dependency information for Docker entities — compose services (depends_on) or Dockerfile stages (COPY --from). Traverses upstream and downstream dependency chains.
Purpose
- Map service dependencies in docker-compose
- Analyze multi-stage Dockerfile build order
- Understand deployment topology
- Trace dependency chains
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Entity type: compose or dockerfile |
name | string | Yes | Entity name: service name or stage name |
file_path | string | No | Filter to specific file path |
direction | string | No | upstream (dependencies), downstream (dependents), or both (default) |
max_depth | integer | No | Maximum traversal depth (default: 10) |
Example Queries
Example Response
Pagination
Most tools support pagination for large result sets:
To get the next page, use the next_cursor from the previous response:
Error Handling
All tools return structured errors:
Common error codes:
SYMBOL_NOT_FOUND- Symbol doesn't existINVALID_FQN- Malformed fully qualified nameINDEX_NOT_READY- Project not yet indexedPAGINATION_ERROR- Invalid cursor
Best Practices
- Start with get_index_info to verify the server is ready
- Use find_symbol for fuzzy matching before get_callers/callees
- Paginate large results instead of requesting everything at once
- Cache results when possible to reduce server load
- Use fully qualified names (FQN) for precise targeting