Skip to main content
Glama
counterlure-mcp

counterlure-mcp

Official

inspect_local_repo

Read-only

Scans a local repository offline before opening or running it, checking hooks, scripts, dependencies and agent instruction files for hidden execution or prompt-injection traps, then returns a run verdict.

Instructions

Use before you open, install, build or run a repository already on this computer: a take-home assignment, a "fix this bug" invite, a cloned interview repo. Reads its files offline (nothing is executed, nothing is sent anywhere, symlinks are not followed) and looks for code that runs on its own: VS Code folder-open tasks, npm install hooks, dev-container commands, Makefile curl-pipe-shell, obfuscated or remote eval, base64-hidden URLs, git hooks, typosquatted or git-sourced dependencies, and instructions to turn off antivirus. It also reads the files that steer you, the agent: CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, .mcp.json, .claude/settings.json, .zed/tasks.json, for hidden-step, exec, secret-reading and fetch-more-instructions text, hooks and unpinned or look-alike MCP servers; plus invisible Unicode Tag text, bidi (Trojan Source) characters and case-colliding paths (CVE-2024-32002). Returns a verdict (do_not_run, review_first or no_known_traps) and findings. no_known_traps is not proof it is safe. For a public GitHub repo not yet cloned, use inspect_interview_repo instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dir": "<dir>"
    },
    "name": "inspect_local_repo"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirYesAbsolute path to the repository folder on this computer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.1

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true, openWorldHint=false, and destructiveHint=false, and the description reinforces this with concrete guarantees: nothing is executed, nothing is sent anywhere, and symlinks are not followed. It goes further by naming the exact categories scanned, disclosing the three possible verdicts, and warning that no_known_traps is not proof of safety, which is exactly the sort of caveat annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The overall structure is sound: the when-to-use framing comes first, the behavioral guarantees next, and the routing to the sibling last. The middle is a dense single sentence with a long enumeration of scanned file types and attack patterns that is informative but heavier than strictly necessary for selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, read-only scan tool with no output schema, the description covers what it inspects, what it guarantees, and what it returns (a verdict plus findings), including the meaning of each verdict. Nothing needed to call it correctly or to interpret its result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is only one parameter, and the schema already documents it at 100% coverage as an absolute path to the repository folder on this computer. The description ties the input to a local repo but adds no format, path, or validation details beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: it reads the files of a repository already on this computer, offline, and scans for self-executing code, agent-steering files, and hidden Unicode/bidi tricks. It explicitly distinguishes itself from the sibling 'inspect_interview_repo' by scoping itself to already-local repos versus public uncloned GitHub repos.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Timing is stated up front: use it before you open, install, build, or run a local repo, with concrete examples (take-home assignment, fix-this-bug invite, cloned interview repo). The exclusion and alternative are also explicit: for a public GitHub repo not yet cloned, use inspect_interview_repo instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.