Skip to main content
Glama

precheck_file

Check a file's past failures and unresolved issues before editing, so you avoid repeating dead-end approaches and save debugging cycles.

Instructions

Check a file's failure history BEFORE modifying it.

MANDATORY: call this BEFORE proposing any change to a file.
Surfaces failed past approaches, unresolved issues, and high churn
so you don't repeat known dead-ends. Cheap (~100 tokens) and prevents
expensive re-debugging cycles.

Read-only; does not modify memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoWhich project this call is about — a registered id, alias, or absolute path (e.g. 'ossdrop'). Omit it when the server was started for a single repo, or when an active project is set with `pjm project use`. Call list_projects to see the registered names.
file_pathYesProject-relative or absolute file path to check (e.g., 'src/auth.py'). Matched against the `location` field of logged events — no file content is read from disk. Returns 'no warnings' if the file has no failure history.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / project
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Which project this call is about — a registered id, alias, or absolute path (e.g. 'ossdrop'). Omit it when the server was started for a single repo, or when an active project is set with `pjm project use`. Call list_projects to see the registered names.",
      +  "title": "Project"
      +}
  2. Changed1 schema field changedv0.1.3
    • addedInput schema / properties / file_path / description
      Added value: +"Project-relative or absolute file path to check (e.g., 'src/auth.py'). Matched against the `location` field of logged events — no file content is read from disk. Returns 'no warnings' if the file has no failure history."
  3. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and meets it: it discloses read-only behavior, no memory modification, what the tool surfaces (failed approaches, unresolved issues, high churn), and approximate cost. This gives the agent an accurate safety and side-effect profile.

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?

The description is compact and front-loaded: the core purpose and mandatory instruction appear first, followed by cost, output value, and safety in short sentences. No sentence is filler; every sentence contributes to correct usage.

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 two-parameter, single-required-field tool with a rich output schema and no annotations, the description provides all needed context: when to use it, what it surfaces, cost, and side-effect safety. Nothing critical is missing for an agent to select and invoke it correctly.

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?

Schema description coverage is 100% and both parameters are richly documented in the input schema, including project resolution and file_path matching semantics. The main description adds no additional parameter-level meaning, so this sits at the high-coverage baseline of 3.

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 first sentence names a specific verb and resource — checking a file's failure history before modification — which clearly differentiates it from the generic sibling tools like search_events or get_issue. The focus on per-file past failures and churn makes the tool's purpose unmistakable.

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?

The description explicitly instructs agents to call this tool before proposing any change to a file and explains why: to avoid repeating failed approaches and expensive re-debugging. It does not name excluded cases or alternative tools, but the when-to-use guidance is unambiguous.

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