Skip to main content
Glama

citation-span

Locate quoted text in a source with exact offsets, or classify it as normalized, elided, paraphrased or absent — Finds each quote an agent attributes to a source text and returns where it sits: exact offsets in UTF-16, code points, UTF-8 bytes and graphemes, so the span slices back to the matched text. Tries an exact match, then a match tolerant of whitespace, curly vs straight quotes, dash types, ellipses, invisible characters and Unicode forms (NFC/NFD, ligatures), naming which normalizations were needed,

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": {
      "source": "<source>",
      "quotes": "<quotes>"
    },
    "name": "citation-span"
  }
}

Input Schema

NameRequiredDescriptionDefault
quotesYesUp to 50 quotes, 40000 characters in total.
sourceYesText the quotes are claimed to come from.
tolerateNoNormalizations that still count as a match. Default: all six.
exactOnlyNoCount only byte-identical matches as pass; normalized matches become fail. Default false.
minLengthNoQuotes shorter than this many characters (after trimming quote marks) are too-short and give unknown. Default 8.
ignoreCaseNoAlso tolerate case differences (reported as a normalization). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose real behavior: exact match is attempted first, then a tolerant pass across whitespace, quote/dash styles, ellipses, invisibles and Unicode forms, with the applied normalizations reported back. However, the text is cut off mid-sentence ('naming which normalizations were needed, ') and never explains what the elided/paraphrased/absent classifications mean or in what form they are returned, leaving a meaningful gap for a tool with no annotations.

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

Conciseness3/5

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

The purpose is front-loaded in the first clause, which is good, but the body is a long dash-chained run-on that duplicates the opening ('Finds each quote...') and ends abruptly with a trailing comma, signalling truncation. Space is spent re-listing normalization categories that the tolerate enum already enumerates.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description must explain both behavior and results. It partially does so by specifying offset units (UTF-16, code points, UTF-8 bytes, graphemes) and that spans slice back to the matched text, which is genuinely useful. But the return structure for the four classification outcomes and the truncated final sentence leave the result contract incomplete for a six-parameter tool.

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 every parameter including tolerate, exactOnly, minLength, ignoreCase and the quote id/text fields is already documented in the schema, establishing a baseline of 3. The description reinforces the tolerance concept ('tolerant of whitespace, curly vs straight quotes...') but adds no syntax or semantics beyond what the schema states, such as how exactOnly interacts with the classification result.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: it locates quoted text in a source and returns exact offsets, or classifies the quote as normalized, elided, paraphrased or absent. That is concrete enough for an agent to know what the tool produces. It does not differentiate itself from the sibling citation-audit, so it falls short of a 5.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'Finds each quote an agent attributes to a source text' suggests the verification use case, and the exact-then-tolerant match order hints at when leniency applies. There is no explicit when-to-use/when-not-to-use statement and no named alternative such as citation-audit. Adequate but leaves routing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources