Skip to main content
Glama

WritersLogic verifiable AI agents

edit-anchor-check

Check that an edit's old-string occurs exactly once in a file, with match contexts — Counts how many times an old-string occurs in a supplied file text (as a replace-in-file tool would see it) and returns each match's offset, line, column and surrounding lines, for an agent about to issue an edit. pass: exactly one literal match, even counting overlapping ones. unknown: several matches, or one match that overlaps another occurrence of the same text (ambiguous; contexts show how to

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": {
      "file": "<file>",
      "oldString": "<oldString>"
    },
    "name": "edit-anchor-check"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesFile text, at most 524288 UTF-8 bytes and 100000 lines.
oldStringYes
contextLinesNoLines of context before and after each listed match. Default 2.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources