Citation anchor check

citation-anchor-check · version 1.0.0 · Text · free, no key needed

Check a quote anchor (exact text plus prefix/suffix) matches exactly one place in a supplied source version.

Use when you need to: verify text quote selector anchors uniquely · check quote with prefix and suffix context in source · is this quotation ambiguous in the document.

Decide before calling

Read the versioned contract and the supported scope below. Reuse citation-anchor-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use citation-anchor-check@1.0.0 for verify text quote selector anchors uniquely. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "sources": [
    {
      "source_id": "doc",
      "version": "2017-02-23",
      "text": "An anotation is not an annotation, but this is an anotation that has some typos."
    }
  ],
  "citation": {
    "source_id": "doc",
    "version": "2017-02-23",
    "selector": {
      "type": "TextQuoteSelector",
      "exact": "anotation",
      "prefix": "this is an ",
      "suffix": " that has some"
    }
  }
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "first_discrepancy": null,
    "match": {
      "start": 50,
      "end": 59
    },
    "authenticity_checked": false,
    "reference_version": "W3C Web Annotation Data Model (Recommendation 2017-02-23) 4.2.4 TextQuoteSelector, 4.2.5 TextPositionSelector; r68 supplied-text profile 1.0.0"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "citation-anchor-check",
  "version": "1.0.0",
  "input": {
    "sources": [
      {
        "source_id": "doc",
        "version": "2017-02-23",
        "text": "An anotation is not an annotation, but this is an anotation that has some typos."
      }
    ],
    "citation": {
      "source_id": "doc",
      "version": "2017-02-23",
      "selector": {
        "type": "TextQuoteSelector",
        "exact": "anotation",
        "prefix": "this is an ",
        "suffix": " that has some"
      }
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/citation-anchor-check/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"sources":[{"source_id":"doc","version":"2017-02-23","text":"An anotation is not an annotation, but this is an anotation that has some typos."}],"citation":{"source_id":"doc","version":"2017-02-23","selector":{"type":"TextQuoteSelector","exact":"anotation","prefix":"this is an ","suffix":" that has some"}}}'

The machine-readable contract is at /v1/tools/citation-anchor-check/versions/1.0.0.

CLI

node cli.mjs run citation-anchor-check 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.