citations

A set of rules for extracting claims from a company's annual 10-K filing while keeping each claim tied to the exact source text. The Anthropic Citations API is a service that attaches source references to model responses.

In plain words
What is it for?
Use it when building or testing a 10-K extractor that returns cited claims, source positions, quoted source text, and citation-coverage measurements.
Why use it?
It prevents unsupported statements from being returned as facts and lets tests check that every claim has a valid citation from the filing.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/sebaustin/mcp-financial-data/citations
Clone the repo
git clone --depth 1 https://github.com/SebAustin/mcp-financial-data

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 427 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00427
Opus 5 $0.00000 $0.00214
Sonnet 5 $0.00000 $0.00085
Haiku 4.5 $0.00000 $0.00043

Measured 2d ago against content hash ccf42791492c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

citations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/citations.mdc · 36 lines

What it actually says

Citations contract — mcp-financial-data

The 10-K extractor is citation-grounded by construction. Hiring managers will paste a 10-K into the demo and check whether every claim is sourced.

Hard rules

  1. Anthropic call shape. Use anthropic.AsyncAnthropic.messages.create(...) with one document content block per 10-K section, each carrying citations={"enabled": True} and a stable title.
  2. Output type. Every claim returned by extract_tenk_section is a CitedClaim(text: str, citations: list[Citation]). Citation carries document_title, start_char_index, end_char_index, cited_text.
  3. Drop or demote. Any text block in the model response that has no citations array is either dropped (preferred) or wrapped in a notes field with a [INFERENCE] prefix. Never returned as a fact.
  4. Tests. Every test under tests/unit/extractors/ asserts:
    • shape (isinstance(c, CitedClaim) for c in result)
    • at least one citation per CitedClaim
    • cited_text actually appears in the source document content.
  5. Evals. The harness records citation_coverage = cited_facts / total_facts per case. The CI smoke slice asserts citation_coverage == 1.0.

Don'ts

  • Don't synthesize "the company says ..." sentences without a citation.
  • Don't merge two citations into one — one cited region per claim.
  • Don't lower the temperature as a substitute for citations. Citations are the audit trail; temperature is just a hyperparameter.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 36 lines · 0 tokens per session scan A ccf42791492c

Subscribe to this mod's changes

citations is a cursor rule published in the GitHub repository SebAustin/mcp-financial-data (0 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 427 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.