get_repo_map
Return a structural overview of a repository: top-level modules, their dependencies, and summary statistics.
Input schema
{
"type": "object",
"properties": {
"repo": {
"type": "string",
"description": "Absolute repo path. Defaults to the daemon's primary repo."
},
"depth": {
"type": "integer",
"default": 2,
"minimum": 1,
"maximum": 5,
"description": "Directory depth for the structural breakdown."
},
"include_external": {
"type": "boolean",
"default": false,
"description": "If true, include node_modules / crate dependencies in the map."
}
}
}
Output schema
{
"type": "object",
"properties": {
"repo": { "type": "string" },
"summary": {
"type": "object",
"properties": {
"files": { "type": "integer" },
"nodes": { "type": "integer" },
"edges": { "type": "integer" },
"languages": { "type": "array", "items": { "type": "string" } }
}
},
"modules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"files": { "type": "integer" },
"nodes": { "type": "integer" },
"imports_from": { "type": "array", "items": { "type": "string" } },
"imported_by": { "type": "array", "items": { "type": "string" } }
}
}
}
}
}
Example
Request:
{ "depth": 2 }
Response:
{
"repo": "/Users/me/my-project",
"summary": {
"files": 142,
"nodes": 18432,
"edges": 94751,
"languages": ["typescript"]
},
"modules": [
{
"path": "src/controllers",
"files": 8,
"nodes": 2341,
"imports_from": ["src/services", "src/models"],
"imported_by": ["src/routes"]
},
{
"path": "src/services",
"files": 12,
"nodes": 4102,
"imports_from": ["src/db", "src/models", "src/config"],
"imported_by": ["src/controllers", "src/jobs"]
}
]
}
When to use
- Onboarding: give a new engineer a structural map of the codebase before they start reading code.
- Architecture review: verify that your layering assumptions (controllers → services → db) are reflected in actual imports.
- AI context seeding: call
get_repo_mapbeforeget_contextto give the agent a high-level frame before diving into details.