API & MCP
Everything a person can do on RAG Citation Debugger, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ragcitationdebugger.usefulweb.site/api/v1/calculate– run RAG Citation DebuggerGET https://ragcitationdebugger.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
RAG Citation Debugger
Paste a generated answer with citation markers ([1], [doc2], [^3], ^1, 【4】) and the retrieved chunks. Each sentence is mapped to the chunks it cites and checked for lexical support: uncited claims, citations to chunks that do not support the sentence, numbers that are not in the cited chunk, better-matching chunks, markers pointing to non-existent chunks, and retrieved chunks that were never used.
| Field | Type | Default | Description |
|---|---|---|---|
answer (required) | textarea | — | Generated answer with citation markers |
chunks (required) | textarea | — | Retrieved chunks. JSON [{"id":"doc1","text":"…"}] or one chunk per block starting with [id] or id: … |
supportThreshold | number | 0.5 | Support threshold. Share of the sentence's content words that must appear in a cited chunk. |
Example request
Answer with a wrong number, a misattributed citation and an uncited claim
curl -X POST https://ragcitationdebugger.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"answer":"The Eiffel Tower is 330 metres tall [1]. It was completed in 1888 for the World's Fair [2]. It was designed by the engineering company of Gustave Eiffel [3]. Around 7 million people visit it every year.","chunks":"[{\"id\":\"1\",\"text\":\"The Eiffel Tower is a wrought-iron lattice tower in Paris. It is 330 metres (1,083 ft) tall, about the same height as an 81-storey building.\"},{\"id\":\"2\",\"text\":\"Construction of the tower began in 1887 and it was completed in 1889 as the centrepiece of the 1889 World's Fair (Exposition Universelle).\"},{\"id\":\"3\",\"text\":\"Paris has a population of about 2.1 million inhabitants and is the capital of France.\"},{\"id\":\"4\",\"text\":\"The tower is named after the engineer Gustave Eiffel, whose company designed and built the tower.\"},{\"id\":\"5\",\"text\":\"The Louvre is the world's most-visited museum.\"}]"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ragcitationdebugger.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
rag_citation_debugger - Local stdio connector:
node src/mcp-stdio.ts --tool=rag-citation-debugger
{
"mcpServers": {
"rag-citation-debugger": { "type": "http", "url": "https://ragcitationdebugger.usefulweb.site/mcp" }
}
}