Low Risk

analyze_codebase_health

Analyze the health of the ingested codebase. Runs 5 analysis passes over all fragments in the current session: 1. Clone Detection — SimHash pairwise scan for Type-1/2/3 code clones 2. Dead Symbol Analysis — defined but never referenced symbols 3. God File Detection — files with > μ+2σ reverse dep...

How to control analyze_codebase_health ↓

What analyze_codebase_health does on Entroly Context Engine

AI agents call analyze_codebase_health to retrieve information from Entroly Context Engine without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

Low Risk

Why analyze_codebase_health needs a policy

The tool exclusively retrieves, examines, and reports on codebase metrics and structural patterns. It produces no side effects—no code execution, no data modification, no deletion, no financial transactions. The five analysis passes are all scanning and detection operations that generate insights without altering the ingested codebase or triggering external operations.

From the tool's definition Tool 'analyze_codebase_health' performs analysis operations: 'Clone Detection', 'Dead Symbol Analysis', 'God File Detection', 'Architecture Violation Detection', 'Naming Convention Analysis' and 'Returns a JSON HealthReport'.

Documented attack patterns abuse exactly the kind of access analyze_codebase_health gives an agent:

How to control analyze_codebase_health

PolicyLayer is an MCP gateway — it sits between your AI agents and Entroly Context Engine, and nothing reaches the server without passing your rules. This is the rule we recommend for analyze_codebase_health:

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "analyze_codebase_health": {}
  }
}

analyze_codebase_health is read-only, so it stays allowed — but everything else on the server is denied unless you say otherwise.

  1. Create a free account and register Entroly Context Engine — nothing to install.
  2. Add this policy — paste it, or build it visually.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
CAP THIS TOOL →

Free to start. No card required.

Related tools and policies

Go deeper

Questions about analyze_codebase_health

What does the analyze_codebase_health tool do? +

Analyze the health of the ingested codebase. Runs 5 analysis passes over all fragments in the current session: 1. Clone Detection — SimHash pairwise scan for Type-1/2/3 code clones 2. Dead Symbol Analysis — defined but never referenced symbols 3. God File Detection — files with > μ+2σ reverse dependencies 4. Architecture Violation Detection — cross-layer imports 5. Naming Convention Analysis — Python/Rust/React convention breaks Returns a JSON HealthReport with: - code_health_score [0–100] and health_grade (A/B/C/D/F) - Per-dimension scores: duplication, dead_code, coupling, arch, naming - clone_pairs, dead_symbols, god_files, arch_violations, naming_issues - summary (human-readable) and top_recommendation (most impactful action). It is categorised as a Read tool in the Entroly Context Engine MCP Server, which means it retrieves data without modifying state.

How do I enforce a policy on analyze_codebase_health? +

Register the Entroly Context Engine MCP server in PolicyLayer and add a rule for analyze_codebase_health: 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 Entroly Context Engine. Nothing to install.

What risk level is analyze_codebase_health? +

analyze_codebase_health is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit analyze_codebase_health? +

Yes. Add a rate_limit block to the analyze_codebase_health 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.

How do I block analyze_codebase_health completely? +

Set action: deny in the PolicyLayer policy for analyze_codebase_health. 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.

What MCP server provides analyze_codebase_health? +

analyze_codebase_health is provided by the Entroly Context Engine MCP server (juyterman1000/entroly). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Entroly Context Engine tool call.

Start from Entroly Context Engine, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.

Free to start. No card required.

52 Entroly Context Engine tools catalogued and risk-classified — across an index of 43,000+ MCP servers.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.