Skip to main content
Glama

verify_quote

Prove a candidate quotation exists verbatim in a source PDF, returning a graded match verdict with page offsets and file hash to block altered quotes before publication.

Instructions

Prove that a candidate quotation is really in a source PDF, before it is published as verbatim.

Call this on EVERY quotation destined for a Quote-with-comment nanopub. You choose which sentence carries the paper's claim — that is judgement. This decides whether the sentence is admissible, and that is not: it is a string search, and anyone can re-run it and get the same answer.

Returns a graded verdict with the page, character offsets and the file's SHA-256 as evidence:

exact byte-identical to the extracted page text normalized matched after whitespace / ligature / typographic punctuation / line-break-hyphen repair extraction_tolerant additionally ignored hyphens and punctuation spacing not_found NOT in this PDF — do not publish it as a quotation

A tier below exact is normal and not a warning about your quotation: PDF extraction inserts line breaks and drops hyphens (a real published FORRT quotation matches only at extraction_tolerant, because pypdf reads "35-year" as "35year"). Every tier canonicalises formatting only — never words, digits or order — so an altered number still fails at every tier. Read matched_text before publishing.

On not_found, closest.text_in_pdf shows what the paper says where it nearly matched. A one-digit change scores ~0.91 similarity and is still not_found: high similarity is not a pass.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_pathYes
quotationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden, and it delivers: it details the graded verdict tiers, the canonicalisation limits (never words, digits, or order), the not_found behavior with closest.text_in_pdf, and the evidence returned (page, character offsets, SHA-256). It even explains why extraction_tolerant matches are normal rather than warnings.

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 front-loaded with the core purpose, then organized into readable tiers and warnings. It is long but appropriately so for a tool with nuanced verdict semantics; each sentence adds decision-relevant information rather than padding.

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?

Given no output schema, the description fully explains the return values: verdict tiers, page, offsets, SHA-256, matched_text, and closest.text_in_pdf. It also covers failure interpretation and the risk of publishing a not_found quotation, making the tool safe to invoke without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are only two parameters, so the description must compensate. It does implicitly define pdf_path as the source PDF and quotation as the candidate text to search for, and it elaborates on how the quotation is matched. It doesn't spell out path formats or exact input constraints, but the semantic mapping is clear enough.

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 states a specific verb and resource: prove that a candidate quotation is really in a source PDF before it is published as verbatim. It is clear about what the tool does and its output, but it never explicitly distinguishes itself from siblings such as verify_chain or validate_draft, so it misses the full sibling-differentiation bar.

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?

It gives explicit when-to-use guidance: 'Call this on EVERY quotation destined for a Quote-with-comment nanopub.' It also clarifies what the tool is not for by separating the human judgement of choosing the claim from the tool's string-search verdict, and it warns against treating high similarity as a pass. This is strong, actionable usage guidance.

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