repo_lens_map
Print an ASCII directory tree of a repository so you can find where files live before reading them. Uses the cached .repo-lens/profile.json when present; falls back to a fresh analysis (without writing cache) when missing. Prefer this over listing directories yourself to save tokens.
This record as markdown: /tools/1mper-labs-mcp-server/repo-lens-map.md
What repo_lens_map does on 1mper Labs
AI agents use repo_lens_map to create or update resources in 1mper Labs, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your 1mper Labs environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
dir | string | — | Directory to map. Defaults to the MCP server process working directory. |
maxDepth | integer | — | Maximum tree depth to render (root is depth 0). Omit for unlimited depth. |
Parameters from the server's own tool schema.
Why repo_lens_map is rated Medium
An AI agent can call repo_lens_map faster than any human can review: one bad instruction and it creates or modifies resources in 1mper Labs by the hundred, each call as confident as the last.
Risk signalsAccepts file system path (dir)
Attacks that exploit this kind of access
The rule that runs repo_lens_map safely
PolicyLayer is an MCP gateway: it sits between your AI agents and 1mper Labs, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For repo_lens_map, this is the rule to start with:
repo_lens_map stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect 1mper Labs, apply this rule, and every repo_lens_map call is checked against it from then on.
Questions about repo_lens_map
Print an ASCII directory tree of a repository so you can find where files live before reading them. Uses the cached .repo-lens/profile.json when present; falls back to a fresh analysis (without writing cache) when missing. Prefer this over listing directories yourself to save tokens. It is categorised as a Write tool in the 1mper Labs MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
repo_lens_map accepts 2 parameters: dir, maxDepth. The full parameter table on this page comes from the server's own tool schema.
Register the 1mper Labs MCP server in PolicyLayer and add a rule for repo_lens_map: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches 1mper Labs. Nothing to install.
repo_lens_map is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the repo_lens_map rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for repo_lens_map. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
repo_lens_map is provided by the 1mper Labs MCP server (@1mper-labs/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on 1mper Labs, and thousands of servers like it.
This server
Across the catalogue