> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codanna.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Relationships

> Trace calls, callers, and dependencies

Codanna is a local code intelligence MCP server and CLI for AI coding agents. After finding symbols with search, trace their relationships — calls, callers, implementations, and impact radius — to understand how code connects.

## Get Calls

See what a function calls:

```bash theme={null}
codanna mcp get_calls process_file
codanna mcp get_calls symbol_id:1883
```

Returns functions invoked by the target, each with `[symbol_id:X]` for follow-up.

## Find Callers

See what calls a function:

```bash theme={null}
codanna mcp find_callers parse_config
codanna mcp find_callers symbol_id:1883
```

Returns functions that invoke the target.

## Find Implementations

See what types implement a trait:

```bash theme={null}
codanna mcp find_symbol LanguageParser
codanna retrieve implementations LanguageParser
```

Returns all structs that implement the given trait, with their definitions and relationships.

## Analyze Impact

Map the full impact radius of a symbol:

```bash theme={null}
codanna mcp analyze_impact Parser
codanna mcp analyze_impact symbol_id:1883 max_depth:5
```

Returns a dependency graph showing:

| Relationship | Example |
| - | - |
| **Calls** | `functionA()` invokes `functionB()` |
| **Uses as type** | Parameter, return type, or field |
| **Renders/Composes** | JSX `<Component>`, struct fields |

## Chaining with symbol\_id

All relationship tools return `[symbol_id:X]` for each result. Use these IDs to chain queries without ambiguity:

```bash theme={null}
# Find a symbol
codanna mcp semantic_search_with_context query:"config parser" limit:1
# Returns: parse_config [symbol_id:567]

# Trace its relationships
codanna mcp get_calls symbol_id:567
codanna mcp find_callers symbol_id:567
codanna mcp analyze_impact symbol_id:567
```

## Language Filtering

Relationship tools take a symbol name or `symbol_id`, not a `lang:` filter — `lang:` applies to search tools (`find_symbol`, `search_symbols`, `semantic_search_docs`, `semantic_search_with_context`). To narrow by language, filter at the search step, then feed the resolved `symbol_id` to the relationship tool:

```bash theme={null}
codanna mcp find_symbol name:auth_handler lang:typescript --json
# Returns: auth_handler [symbol_id:890]

codanna mcp find_callers symbol_id:890
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Document Search" icon="file-lines" href="/features/document-search">
    Search markdown alongside code.
  </Card>

  <Card title="Agentic Guidance" icon="lightbulb" href="/workflows/agentic-guidance">
    Chain relationship tools with hints.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.