Skip to main content
Glama

Check a file for a tarpit

check_file
Read-onlyIdempotent

Scans a file for deliberate anti-AI obfuscation (a tarpit) before reading or analyzing it, returning a risk score and recommended strategy so agents can skip risky files and avoid wasted tokens.

Instructions

Check one file for deliberate anti-AI obfuscation (a "tarpit") before reading it.

Call this BEFORE reading or analyzing an unfamiliar or suspicious file. It only measures the text's shape; it never runs, decodes, or deobfuscates anything.

Returns a report with score (0-100), hardened (true when score >= 55), confidence, the fired_signals, and a recommended_strategy. If hardened is true, stop: do not read or trace this file. Skip it, or report it to the user, instead of spending tokens on it.

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": {
      "path": "<path>"
    },
    "name": "check_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file to check, e.g. 'vendor/app.min.js'.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.3
    • addedInput schema / properties / path / description
      Added value: +"Path to the file to check, e.g. 'vendor/app.min.js'."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the bar is lower, but the description still adds real behavior: it only measures text shape and never runs, decodes, or deobfuscates anything, which is a non-obvious guarantee about inertness. It also discloses the hardening threshold (score >= 55) and what the agent should do on a positive result.

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

Conciseness5/5

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

Front-loaded with the action, then the pre-condition, then a short return-value list, then the stop rule — ordering matches how an agent needs the information. No sentence is filler; every clause carries either scope, behavior, or a decision rule.

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 single-parameter read tool with full annotation coverage and an output schema, the description covers what remains: when to call, what it does and does not do, and how to act on the result. The brief return-value summary is slightly redundant with the output schema but functions as the hook for the stop rule.

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?

One parameter with 100% schema description coverage, so the schema already carries the semantics and baseline 3 applies. The description adds no format, path-resolution, or size/encoding guidance beyond what the schema's 'path to the file' example provides.

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?

States a specific verb and resource (check one file) plus the object of the check (deliberate anti-AI obfuscation, a "tarpit"), and scopes it to a single file rather than a repo, which separates it from scan_repo/check_source by granularity. An agent knows exactly what it gets back without opening the schema.

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

Usage Guidelines4/5

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

Gives an explicit call condition (BEFORE reading or analyzing an unfamiliar or suspicious file) and a decision rule after the call (if hardened, stop; skip or report instead). It does not name sibling alternatives like check_source or scan_repo, so routing between them is only implied by the file-vs-repo scope.

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

Deploy Server

Other Tools