Skip to main content
Glama
UK Business Tools - Ledgerhall

UK Business Tools - Ledgerhall

Format OSCOLA Citation String

law_citations_format_oscola
Read-onlyIdempotent

Formats resolved UK legal citation fields into OSCOLA 4th edition strings and rechecks source existence against TNA or legislation.gov.uk, flagging verified versus unverified citations.

Instructions

USE THIS TOOL AFTER citations_resolve to produce the correctly formatted OSCOLA citation string.

Pass the fields citations_resolve returned. Formats per OSCOLA 4th edition. This tool re-checks existence itself — neutral citations against TNA, SIs against legislation.gov.uk — and does not take the caller's word. Raises not_found if the source confirms the document does not exist, validation for incomplete fields or an ambiguous court (e.g. bare EWHC), transient if the check could not run (NOT evidence of absence).

Returns the OSCOLA string with verified=true only when the document was confirmed; Act sections, law reports and retained EU law are formatted with verified=false — present them as unverified.

AFTER a refusal, do NOT manufacture a citation; ask the user for the source URL or better identifying details. Never construct the input fields yourself — guessed fields are the main fabrication route.

Authoritative OSCOLA formatting for UK legal citations.

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": {
      "citation_type": "<citation_type>"
    },
    "name": "law_citations_format_oscola"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNo'raw' from citations_resolve. Used as-is for EU retained law — the original text preserves the Regulation/Directive distinction.
pageNo'page' from citations_resolve (starting page in the law report).
yearNo'year' from citations_resolve.
courtNo'court' from citations_resolve, e.g. 'UKSC', 'EWCA CIV', 'EWHC (KB)'.
numberNo'number' from citations_resolve (judgment number within the year).
volumeNo'volume' from citations_resolve (law report volume, if any).
sectionNo'section' from citations_resolve, e.g. '47', '12', '20A'.
si_yearNo'si_year' from citations_resolve.
si_numberNo'si_number' from citations_resolve.
confidenceNoIgnored; accepted for compatibility with older callers. This tool verifies the citation against the source itself and does not trust a caller-reported confidence.
resolved_urlNoIgnored; accepted for compatibility. The URL is rebuilt from the citation fields and returned.
citation_typeYes'type' field from citations_resolve result.
report_seriesNo'report_series' from citations_resolve, e.g. 'WLR', 'AC', 'QB'.
legislation_titleNo'legislation_title' from citations_resolve, e.g. 'Companies Act 2006'.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.4.1
    • addedInput schema / properties / confidence / anyOf
      Added value: +[
      +  {
      +    "maximum": 1,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / confidence / default
      Added value: +null
    • changedInput schema / properties / confidence / description
      Previous value: -"'confidence' from citations_resolve. Refuses to format if 0.0 — that means TNA confirmed the document does not exist. Pass only the value citations_resolve returned; do not guess."New value: +"Ignored; accepted for compatibility with older callers. This tool verifies the citation against the source itself and does not trust a caller-reported confidence."
    • removedInput schema / properties / confidence / maximum
      Removed value: -1
    • removedInput schema / properties / confidence / minimum
      Removed value: -0
    • removedInput schema / properties / confidence / type
      Removed value: -"number"
    • changedInput schema / properties / resolved_url / description
      Previous value: -"'resolved_url' from citations_resolve. Must be non-null for neutral citations."New value: +"Ignored; accepted for compatibility. The URL is rebuilt from the citation fields and returned."
    • changedInput schema / required
      Previous value: -[
      -  "citation_type",
      -  "confidence"
      -]New value: +[
      +  "citation_type"
      +]
  2. First observedv0.2.1

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses that the tool independently re-verifies against TNA and legislation.gov.uk rather than trusting the caller, and enumerates the error taxonomy (not_found, validation for incomplete fields or bare EWHC, transient explicitly noted as NOT evidence of absence). It also explains the verified flag semantics per citation type, which is behavior an agent must act on.

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 ordering instruction and error semantics in short, scannable sentences. The closing line 'Authoritative OSCOLA formatting for UK legal citations' largely restates the title and could be cut, and the verification/refusal guidance spans several sentences that overlap slightly.

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?

For a 14-parameter tool with an output schema, it covers everything the schema cannot: precondition (call after resolve), verification stance, error classes and their meanings, and how to present verified=false results. Nothing an agent needs to invoke or interpret this tool correctly is missing.

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 coverage is 100% and the schema itself already documents the compatibility/ignored fields (confidence, resolved_url) and the raw-as-is EU rule, so the description adds little parameter-level detail beyond 'pass the fields citations_resolve returned'. It notes the ambiguous-court failure mode tied to the court field, but that is behavioral rather than semantic. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb and resource ('produce the correctly formatted OSCOLA citation string', per OSCOLA 4th edition) and positions itself against a named sibling by declaring it runs AFTER citations_resolve. An agent can distinguish this formatting step from parsing/resolution without opening any schema.

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?

Gives ordering ('USE THIS TOOL AFTER citations_resolve'), input provenance ('Pass the fields citations_resolve returned'), and a hard negative instruction ('AFTER a refusal, do NOT manufacture a citation; ask the user for the source URL'). It also forbids constructing fields manually, naming the alternative behavior explicitly.

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

Deploy Server

Other Tools