# repo_lens_analyze

Analyze a repository and return a compact overview: file/dir counts, total bytes, language distribution, dependency manifests and a directory tree. Use this first when you need to understand an unfamiliar codebase (what languages it uses, what packages it depends on, how big it is). This tool performs a fresh scan and never writes the cache, so it is side-effect free. Pass json=true for the full machine-readable profile; otherwise you get a human-readable summary.

Agent View of the PolicyLayer registry record for `repo_lens_analyze`. HTML page: https://policylayer.com/tools/1mper-labs-mcp-server/repo-lens-analyze

## Facts

- Tool: `repo_lens_analyze`
- Server: 1mper Labs (`@1mper-labs/mcp-server`) — https://policylayer.com/tools/1mper-labs-mcp-server.md
- Install: `npx -y @1mper-labs/mcp-server`
- Homepage: https://www.npmjs.com/package/@1mper-labs/mcp-server
- Risk category: Read (Low risk)
- Registry record: grade D, identity unverified
- Server rate-limited: no
- Parameters: 2
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `dir` | string | no | Directory to analyze. Defaults to the MCP server process working directory. |
| `json` | boolean | no | Return the full RepoProfile as JSON instead of a text summary. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "repo_lens_analyze",
    "arguments": {}
  }
}
```

## Why repo_lens_analyze is rated Low

Even though repo_lens_analyze only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

Risk signals: Accepts file system path (dir)

## Use case

AI agents call repo_lens_analyze to retrieve information from 1mper Labs without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches 1mper Labs:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "repo_lens_analyze": {}
  }
}
```

## Other tools on 1mper Labs (2)

- `repo_lens_profile` — Execute — https://policylayer.com/tools/1mper-labs-mcp-server/repo-lens-profile.md
- `repo_lens_map` — Write — https://policylayer.com/tools/1mper-labs-mcp-server/repo-lens-map.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=1mper-labs-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/1mper-labs-mcp-server
