Skip to main content
Glama

Parse OSCOLA Citations

citations_parse
Read-only

USE THIS TOOL WHEN you have free text (a memo, an email, a clause) and want every OSCOLA-style citation it contains extracted and classified.

Identifies: neutral citations ([2024] UKSC 12), law reports ([2024] 1 WLR 100), legislation sections (s.47 Companies Act 2006), SIs (SI 2018/1234), retained EU law (Regulation (EU) 2016/679).

Parsing is pure regex by default. Ambiguous citations (e.g. bare [2024] EWHC without division) can OPTIONALLY be disambiguated by setting disambiguate=True, which asks the CONNECTED CLIENT's own model (not this server) to resolve the division via MCP sampling — off by default. Canonical TNA / legislation.gov.uk URLs are constructed where possible, but nothing is checked: every result has verified=false.

AFTER calling, pass each citation through citations_resolve to verify it points at a real document before quoting or formatting it — the parser recognises the SHAPE of a citation but does not confirm the document exists.

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": {
      "text": "<text>"
    },
    "name": "citations_parse"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesFree text containing OSCOLA citations to extract. Supported: neutral citations ([2024] UKSC 12), law reports ([2024] 1 WLR 100), legislation sections (s.47 Companies Act 2006), SIs (SI 2018/1234), retained EU law (Regulation (EU) 2016/679). Max 50,000 chars.
disambiguateNoDefault False — pure-regex parsing, no model in the loop. If True, ambiguous citations (e.g. bare EWHC without a division) are sent to the connected client's own LLM, via MCP sampling, to resolve the division. Opt in only when you want best-effort division resolution and accept that a model shapes the result.

Output Schema

NameRequiredDescriptionDefault
ambiguousYesCitations with confidence < 0.7; may have been partially disambiguated via sampling
citationsYesAll successfully parsed citations (confidence >= 0.7)
text_lengthYesCharacter length of the input text
parse_duration_msYesTime taken to parse, in milliseconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedOutput schema / properties / ambiguous / items / properties / confidence / description
      Previous value: -"Parse confidence 0.0–1.0. Citations below 0.7 are ambiguous and may have been sent for LLM disambiguation."New value: +"Parse confidence 0.0–1.0: how sure the parser is about the citation's shape. Citations below 0.7 are ambiguous and may have been sent for LLM disambiguation. 0.0 from citations_resolve means the source confirmed the document does not exist. Existence is reported by `verified`, not by a high confidence."
    • changedOutput schema / properties / ambiguous / items / properties / resolved_url / description
      Previous value: -"TNA Find Case Law or legislation.gov.uk URL if successfully resolved"New value: +"Canonical TNA Find Case Law or legislation.gov.uk URL for the cited document, constructed from the citation. Constructing a URL does not prove the document exists: check `verified`. Null when no canonical URL can be built (ambiguous court, Act sections — see search_url)."
    • addedOutput schema / properties / ambiguous / items / properties / search_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "For Act sections: a legislation.gov.uk title-search URL. It is a search, not a link to the Act, and does not confirm the Act exists."
      +}
    • addedOutput schema / properties / ambiguous / items / properties / verified
      Added value: +{
      +  "default": false,
      +  "description": "True only when this server confirmed the document exists at resolved_url against the authoritative source (TNA for neutral citations, legislation.gov.uk for SIs). Always false from citations_parse, and for citation types this server cannot check (Act sections, law reports, retained EU law).",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / citations / items / properties / confidence / description
      Previous value: -"Parse confidence 0.0–1.0. Citations below 0.7 are ambiguous and may have been sent for LLM disambiguation."New value: +"Parse confidence 0.0–1.0: how sure the parser is about the citation's shape. Citations below 0.7 are ambiguous and may have been sent for LLM disambiguation. 0.0 from citations_resolve means the source confirmed the document does not exist. Existence is reported by `verified`, not by a high confidence."
    • changedOutput schema / properties / citations / items / properties / resolved_url / description
      Previous value: -"TNA Find Case Law or legislation.gov.uk URL if successfully resolved"New value: +"Canonical TNA Find Case Law or legislation.gov.uk URL for the cited document, constructed from the citation. Constructing a URL does not prove the document exists: check `verified`. Null when no canonical URL can be built (ambiguous court, Act sections — see search_url)."
    • addedOutput schema / properties / citations / items / properties / search_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "For Act sections: a legislation.gov.uk title-search URL. It is a search, not a link to the Act, and does not confirm the Act exists."
      +}
    • addedOutput schema / properties / citations / items / properties / verified
      Added value: +{
      +  "default": false,
      +  "description": "True only when this server confirmed the document exists at resolved_url against the authoritative source (TNA for neutral citations, legislation.gov.uk for SIs). Always false from citations_parse, and for citation types this server cannot check (Act sections, law reports, retained EU law).",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / disambiguate
      Added value: +{
      +  "default": false,
      +  "description": "Default False — pure-regex parsing, no model in the loop. If True, ambiguous citations (e.g. bare EWHC without a division) are sent to the connected client's own LLM, via MCP sampling, to resolve the division. Opt in only when you want best-effort division resolution and accept that a model shapes the result.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "CitationsParseInput.",
      -  "properties": {
      -    "disambiguate": {
      -      "default": false,
      -      "description": "Default False — pure-regex parsing, no model in the loop. If True, ambiguous citations (e.g. bare EWHC without a division) are sent to the connected client's own LLM, via MCP sampling, to resolve the division. Opt in only when you want best-effort division resolution and accept that a model shapes the result.",
      -      "type": "boolean"
      -    },
      -    "text": {
      -      "description": "Free text containing OSCOLA citations to extract. Supported: neutral citations ([2024] UKSC 12), law reports ([2024] 1 WLR 100), legislation sections (s.47 Companies Act 2006), SIs (SI 2018/1234), retained EU law (Regulation (EU) 2016/679). Max 50,000 chars.",
      -      "maxLength": 50000,
      -      "minLength": 1,
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "text"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Free text containing OSCOLA citations to extract. Supported: neutral citations ([2024] UKSC 12), law reports ([2024] 1 WLR 100), legislation sections (s.47 Companies Act 2006), SIs (SI 2018/1234), retained EU law (Regulation (EU) 2016/679). Max 50,000 chars.",
      +  "maxLength": 50000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "text"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / params / properties / disambiguate / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / params / properties / disambiguate / description
      Previous value: -"If True, ambiguous citations (e.g. bare EWHC without division) are sent to the LLM for disambiguation via sampling."New value: +"Default False — pure-regex parsing, no model in the loop. If True, ambiguous citations (e.g. bare EWHC without a division) are sent to the connected client's own LLM, via MCP sampling, to resolve the division. Opt in only when you want best-effort division resolution and accept that a model shapes the result."
  4. Changed1 schema field changed
    • changedInput schema / properties / params / description
      Previous value: -"CitationsParseInput with text (max 50,000 chars) and disambiguate flag."New value: +"CitationsParseInput."
  5. Changed1 schema field changed
    • addedInput schema / properties / params / description
      Added value: +"CitationsParseInput with text (max 50,000 chars) and disambiguate flag."
  6. Changed8 schema fields changed
    • changedOutput schema / description
      Previous value: -"Generic wrapper for non-object return types."New value: +"Result of parsing all OSCOLA citations from a body of text."
    • addedOutput schema / properties / ambiguous
      Added value: +{
      +  "description": "Citations with confidence < 0.7; may have been partially disambiguated via sampling",
      +  "items": {
      +    "description": "A single parsed OSCOLA citation with optional resolution.",
      +    "properties": {
      +      "confidence": {
      +        "description": "Parse confidence 0.0–1.0. Citations below 0.7 are ambiguous and may have been sent for LLM disambiguation.",
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "court": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Court code: UKSC, UKPC, EWCA Civ, EWCA Crim, EWHC (KB), EWHC (Ch), EWHC (Comm), EWHC (Fam), EWHC (Pat), EWHC (IPEC), UKUT (IAC), UKUT (TCC), UKUT (AAC), UKUT (LC), EAT, UKFTT (TC), UKFTT (GRC)"
      +      },
      +      "legislation_title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Title of legislation (for s.NN Act YYYY citations)"
      +      },
      +      "number": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Judgment number within the year"
      +      },
      +      "page": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Starting page in the law report"
      +      },
      +      "raw": {
      +        "description": "Original citation text as found in the source",
      +        "type": "string"
      +      },
      +      "report_series": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Law report series abbreviation: WLR, AC, QB, KB, Ch, All ER, EWCA Civ, etc."
      +      },
      +      "resolved_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "TNA Find Case Law or legislation.gov.uk URL if successfully resolved"
      +      },
      +      "section": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Section number referenced"
      +      },
      +      "si_number": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "SI number"
      +      },
      +      "si_year": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "SI year (for SI YYYY/NNN citations)"
      +      },
      +      "type": {
      +        "description": "Classification of the citation type",
      +        "enum": [
      +          "neutral",
      +          "law_report",
      +          "legislation",
      +          "si",
      +          "eu_retained"
      +        ],
      +        "type": "string"
      +      },
      +      "volume": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Report volume number (for law reports)"
      +      },
      +      "year": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Year component of the citation"
      +      }
      +    },
      +    "required": [
      +      "raw",
      +      "type",
      +      "confidence"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / citations
      Added value: +{
      +  "description": "All successfully parsed citations (confidence >= 0.7)",
      +  "items": {
      +    "description": "A single parsed OSCOLA citation with optional resolution.",
      +    "properties": {
      +      "confidence": {
      +        "description": "Parse confidence 0.0–1.0. Citations below 0.7 are ambiguous and may have been sent for LLM disambiguation.",
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "court": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Court code: UKSC, UKPC, EWCA Civ, EWCA Crim, EWHC (KB), EWHC (Ch), EWHC (Comm), EWHC (Fam), EWHC (Pat), EWHC (IPEC), UKUT (IAC), UKUT (TCC), UKUT (AAC), UKUT (LC), EAT, UKFTT (TC), UKFTT (GRC)"
      +      },
      +      "legislation_title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Title of legislation (for s.NN Act YYYY citations)"
      +      },
      +      "number": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Judgment number within the year"
      +      },
      +      "page": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Starting page in the law report"
      +      },
      +      "raw": {
      +        "description": "Original citation text as found in the source",
      +        "type": "string"
      +      },
      +      "report_series": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Law report series abbreviation: WLR, AC, QB, KB, Ch, All ER, EWCA Civ, etc."
      +      },
      +      "resolved_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "TNA Find Case Law or legislation.gov.uk URL if successfully resolved"
      +      },
      +      "section": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Section number referenced"
      +      },
      +      "si_number": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "SI number"
      +      },
      +      "si_year": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "SI year (for SI YYYY/NNN citations)"
      +      },
      +      "type": {
      +        "description": "Classification of the citation type",
      +        "enum": [
      +          "neutral",
      +          "law_report",
      +          "legislation",
      +          "si",
      +          "eu_retained"
      +        ],
      +        "type": "string"
      +      },
      +      "volume": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Report volume number (for law reports)"
      +      },
      +      "year": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Year component of the citation"
      +      }
      +    },
      +    "required": [
      +      "raw",
      +      "type",
      +      "confidence"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / parse_duration_ms
      Added value: +{
      +  "description": "Time taken to parse, in milliseconds",
      +  "type": "integer"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / text_length
      Added value: +{
      +  "description": "Character length of the input text",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "citations",
      +  "ambiguous",
      +  "text_length",
      +  "parse_duration_ms"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  7. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only and non-destructive, but the description adds genuinely non-recoverable context: parsing is regex-only by default, disambiguation routes to the connected client's own model via MCP sampling, and every result carries verified=false because nothing is checked. The only shortfall is that it could say more about what an unverified canonical URL means in practice (e.g. whether malformed guesses are emitted at all).

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

Conciseness4/5

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

Front-loaded with the trigger, then the recognised forms, then the sampling caveat, then the downstream handoff — good ordering with no filler sentences. It loses a point for restating the citation-type list that already appears verbatim in the schema's text parameter description, and for heavy all-caps emphasis.

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?

An output schema exists so return shape needn't be described, and the description nonetheless supplies the one output fact that matters operationally (verified=false on everything). For a two-parameter parser with a model-in-the-loop option, nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds the consequence of disambiguate rather than just its type: a model shapes the result and it is off by default. It also frames the ambiguous-input example (bare [2024] EWHC without division) at tool level, which helps the agent picture when to flip the flag.

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

Purpose5/5

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

The first line gives a specific verb pair (extract and classify) plus the resource (OSCOLA-style citations) and the input shape (free text: memo, email, clause). Enumeration of recognised citation forms (neutral citations, law reports, legislation sections, SIs, retained EU law) makes the scope concrete and clearly separates it from citations_resolve and citations_format_oscola.

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?

Explicit trigger condition ("USE THIS TOOL WHEN you have free text...") and an explicit follow-up step routing unresolved citations to citations_resolve before quoting. It also states the opt-in condition for disambiguate rather than leaving it to inference. This is when-to-use, what-to-do-next, and an exclusion in one.

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.