Skip to main content
Glama

Check what changed

yof_check_diff
Read-onlyIdempotent

Scans only changed lines in a diff or working tree for leaked keys and added package risks before you mark work done; code stays local.

Instructions

Scan only the lines that changed: a unified diff you pass in, or, with no diff, the working tree against the last commit plus new untracked files (needs git). Use it after each edit and before you say the work is done; use yof_check for a full pass that also covers unchanged files. Only added lines are checked for keys, and only dependencies added to a changed manifest are looked up on npm, PyPI and OSV; code never leaves this computer. Limits: 1 MB of diff, 300 files and 90 seconds. Returns counts, must_fix_before_done and up to 100 findings with secrets redacted; an empty list means nothing was found in the changed lines.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
diffNoA unified diff (git diff format), at most 1 MB and 300 files. Leave it out to let yof ask git for the working tree's changes.
offlineNotrue skips the npm, PyPI and OSV lookups, so nothing leaves this computer; package problems are then not reported. Default false.

Output Schema

NameRequiredDescriptionDefault
moreNoHow many findings were left out of the list, when there are more than 100.
nextYesWhat to do next.
countsYesHow many findings of each urgency (all of them, not only the listed ones).
sourceYesWhere the changes came from: the diff passed in, or the working tree.
findingsYesAt most 100 findings. kind is key or package; value is a prefix plus REDACTED.
lines_addedYesHow many added lines were scanned.
files_changedYesHow many changed files were read.
package_lookupsYes"off", or which registries were asked (names and versions only).
must_fix_before_doneYestrue when at least one fix_now finding is open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.2
    • changedInput schema / properties / diff / description
      Previous value: -"A unified diff (at most 1 MB). Leave out to use git."New value: +"A unified diff (git diff format), at most 1 MB and 300 files. Leave it out to let yof ask git for the working tree's changes."
    • changedInput schema / properties / offline / description
      Previous value: -"Skip the package-registry lookups (no network at all). Default false."New value: +"true skips the npm, PyPI and OSV lookups, so nothing leaves this computer; package problems are then not reported. Default false."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "counts": {
      +      "description": "How many findings of each urgency (all of them, not only the listed ones).",
      +      "properties": {
      +        "fix_now": {
      +          "type": "integer"
      +        },
      +        "fix_week": {
      +          "type": "integer"
      +        },
      +        "info": {
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "files_changed": {
      +      "description": "How many changed files were read.",
      +      "type": "integer"
      +    },
      +    "findings": {
      +      "description": "At most 100 findings. kind is key or package; value is a prefix plus REDACTED.",
      +      "items": {
      +        "properties": {
      +          "file": {
      +            "description": "Path relative to the project root.",
      +            "type": "string"
      +          },
      +          "kind": {
      +            "description": "key or package.",
      +            "type": "string"
      +          },
      +          "line": {
      +            "description": "Line in the file (key findings).",
      +            "type": "integer"
      +          },
      +          "message": {
      +            "description": "What is wrong (package findings).",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Readable rule or package name.",
      +            "type": "string"
      +          },
      +          "rule": {
      +            "description": "Rule id, for yof_explain, yof_fix_prompt and yof_verify.",
      +            "type": "string"
      +          },
      +          "severity": {
      +            "description": "fix_now, fix_week or info.",
      +            "type": "string"
      +          },
      +          "value": {
      +            "description": "Secret prefix plus REDACTED (key findings).",
      +            "type": "string"
      +          },
      +          "why": {
      +            "description": "Why it matters.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "lines_added": {
      +      "description": "How many added lines were scanned.",
      +      "type": "integer"
      +    },
      +    "more": {
      +      "description": "How many findings were left out of the list, when there are more than 100.",
      +      "type": "integer"
      +    },
      +    "must_fix_before_done": {
      +      "description": "true when at least one fix_now finding is open.",
      +      "type": "boolean"
      +    },
      +    "next": {
      +      "description": "What to do next.",
      +      "type": "string"
      +    },
      +    "package_lookups": {
      +      "description": "\"off\", or which registries were asked (names and versions only).",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Where the changes came from: the diff passed in, or the working tree.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "files_changed",
      +    "lines_added",
      +    "package_lookups",
      +    "counts",
      +    "must_fix_before_done",
      +    "findings",
      +    "next"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.3.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false), and the description adds substantial behavior beyond them: only added lines are scanned for keys, only deps added to a changed manifest are looked up on npm/PyPI/OSV, and code stays local. It also discloses hard limits (1 MB diff, 300 files, 90 s) and that findings are capped at 100 with secrets redacted — none of which the annotations convey.

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 purpose and mode selection, then usage, behavior, limits, and return shape in that order. Every clause carries operative information — no restatement of the title or filler — despite the description being longer than average.

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, read-only scan tool this covers everything needed to call it correctly: input modes, prerequisites, limits, network behavior, and what an empty result means. An output schema exists and the description still summarizes the key return fields (counts, must_fix_before_done, redaction, 100-finding cap), which is additive rather than redundant.

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%, so both parameters (diff, offline) are already documented, including size bounds and the effect of omitting diff. The description reinforces the mode-switching consequence of leaving diff out but adds no syntax or format detail beyond the schema, so baseline 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?

States a specific verb and scope ('Scan only the lines that changed') and immediately defines both input modes: a supplied unified diff or, absent one, the working tree plus untracked files. It explicitly contrasts itself with yof_check (full pass including unchanged files), so an agent can pick the right tool without opening either schema.

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?

Gives explicit invocation timing ('after each edit and before you say the work is done') and names the alternative with the condition that selects it ('use yof_check for a full pass that also covers unchanged files'). The one prerequisite that matters (git availability for the no-diff mode) is also stated.

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