Tools

The eleven tools the Moonlit MCP server gives your AI app, and what the server tells the app about using them. The app picks the tool; you ask the question.

How usage is counted

Your plan has a monthly number of units. A call is any tool call; a unit is a call that counts toward your usage. Every search, citation lookup, version list and full read of a document or of one of its versions costs one unit. Five tools cost no units: get_document_elements, get_search_filters, get_research_guidance, convert_to_celex and get_account_status. Organization MCP keys follow the organization's plan, capped or unlimited, and report their own count.

ToolUse it forCost
search_legal_documentsAnswer a question in plain language. Keyword and semantic retrieval, reranked.1 unit
search_legal_documents_by_keywordFind exact words, citations or article numbers. Boolean operators, counts, facets.1 unit
search_document_citationsFind what cites a document, or what it cites, down to the article.1 unit
get_documentRead one document in full, with its metadata and source link.1 unit
get_document_versionsList the versions of a law, each with the period it applied.1 unit
get_document_versionRead the text of one version, as it stood in that period.1 unit
get_document_elementsList the articles of a law or regulation, with citation counts.0 units
get_search_filtersLook up valid jurisdictions, portals, document types, fields of law and sources.0 units
get_research_guidanceLoad Moonlit's research method: operator, reasoning or memo.0 units
convert_to_celexTurn a directive or regulation number into its CELEX identifier.0 units
get_account_statusSee your plan, units used and when the count resets.0 units

Three ways in: a question in plain language, exact words, or the citation graph. Results are candidates; the app reads a document before it cites it.

1 unit

Finds documents for a question in plain language. Runs a keyword search and a semantic search, merges the two, and reranks the result. The default for a substantive question or for reasoning phrased in other words. The count covers the returned page only.

Parameters 14
query string required
The question or search text.
jurisdictions string[]
Jurisdiction names from get_search_filters("jurisdictions_portals") or from search facets. Covers a whole legal order.
portals string[]
Portal values from the same lookup. Targets specific collections. Jurisdictions and portals combine as a union.
document_types string[]
Document type ids from get_search_filters("document_types").
fields_of_law string[]
Field-of-law ids from get_search_filters("fields_of_law").
sources string[]
Courts and legislative bodies, from get_search_filters("sources").
from_date, until_date string, YYYY-MM-DD
Always pass both.
reference_identifier string
Limit results to documents that cite, or are cited by, this document.
reference_direction integer
0 documents that cite it, 1 documents it cites, 2 both. Only with reference_identifier.
article_reference_id string
Narrow the reference filter to one article. Ids come from get_document_elements.
semantic_weight number, 0 to 1
Weight of the semantic ranking. Leave unset and the server adapts it.
reranker_type integer
1 Google Vertex AI (default), 2 the alternative reranker. Leave unset.
page, num_results integer
Page 1 to 1000, default 1. Results per page 1 to 100.
output_format string
toon (default, compact) or json.

1 unit

Finds documents by exact words, phrases or Boolean expressions. Best when the citation, ECLI, CELEX or article number is known, and for counting: the count covers every matching document. Uppercase AND, OR and NOT, parentheses to group, one pair of quotes for a phrase, a trailing or infix * for word variants. A query of * alone lists the selected scope.

Parameters 16
query string required
The question or search text.
jurisdictions string[]
Jurisdiction names from get_search_filters("jurisdictions_portals") or from search facets. Covers a whole legal order.
portals string[]
Portal values from the same lookup. Targets specific collections. Jurisdictions and portals combine as a union.
document_types string[]
Document type ids from get_search_filters("document_types").
fields_of_law string[]
Field-of-law ids from get_search_filters("fields_of_law").
sources string[]
Courts and legislative bodies, from get_search_filters("sources").
from_date, until_date string, YYYY-MM-DD
Always pass both.
reference_identifier string
Limit results to documents that cite, or are cited by, this document.
reference_direction integer
0 documents that cite it, 1 documents it cites, 2 both. Only with reference_identifier.
article_reference_id string
Narrow the reference filter to one article. Ids come from get_document_elements.
sort_type integer
0 relevance (default), 1 newest first, 2 oldest first, 3 most cited.
facets boolean
Adds counts per jurisdiction, portal, source and document type. Each facet applies the other filters and skips its own.
facet_limit integer, 1 to 4000
Sources kept per category in the sources facet, most documents first. Default 10. sourcesTotal and sourcesTruncated report the cut.
all_facets boolean
Adds fields of law and document types with a count of zero. Needs facets.
page, num_results integer
Page 1 to 1000, default 1. Results per page 1 to 100.
output_format string
toon (default, compact) or json.

search_document_citations

1 unit

Finds the documents that cite a document, the documents it cites, or both. Works for a whole regulation or a single article, so it answers "which judgments interpret Article 22" at article level. Each result names how it relates to the document, for example Amends [AMENDS].

Parameters 16
reference_identifier string required
The document to find references for.
reference_direction integer
0 documents that cite it, 1 documents it cites, 2 both. Only with reference_identifier.
article_reference_id string
Narrow the reference filter to one article. Ids come from get_document_elements.
reference_families string[]
Keeps only documents related in one of these ways: CITES, AMENDS, APPLIES, INTERPRETS, LEGAL_BASIS, REPEALS, CASE_HISTORY, RELATED_CASE, STRUCTURE, EDITORIAL, SAME_DOCUMENT, DOCUMENT_VERSION or JURISDICTION_SPECIFIC. Ignored with article_reference_id.
reference_types string[]
Keeps only documents related by one of these reference types, a narrower cut than a family. Ignored with article_reference_id.
jurisdictions string[]
Jurisdiction names from get_search_filters("jurisdictions_portals") or from search facets. Covers a whole legal order.
portals string[]
Portal values from the same lookup. Targets specific collections. Jurisdictions and portals combine as a union.
document_types string[]
Document type ids from get_search_filters("document_types").
fields_of_law string[]
Field-of-law ids from get_search_filters("fields_of_law").
sources string[]
Courts and legislative bodies, from get_search_filters("sources").
from_date, until_date string, YYYY-MM-DD
Always pass both.
sort_type integer
0 relevance (default), 1 newest first, 2 oldest first, 3 most cited.
facets boolean
Adds counts per jurisdiction, portal, source and document type. Each facet applies the other filters and skips its own.
facet_limit integer, 1 to 4000
Sources kept per category in the sources facet, most documents first. Default 10. sourcesTotal and sourcesTruncated report the cut.
page, num_results integer
Page 1 to 1000, default 1. Results per page 1 to 100.
output_format string
toon (default, compact) or json.

Documents

get_document

1 unit

Returns one document in full: identifier, title, date, jurisdiction, portal, source, source URL and PDF, document types, in-force status, summary, and the text as markdown. The app uses it to read or quote a document after a search.

Parameters 2
document_identifier string required
The document id, as returned in the identifier field of search results. A CELEX number such as 32016R0679 or an ECLI.
internal_links boolean
true (default) keeps links to other Moonlit documents in the markdown; false keeps the link text only.

get_document_versions

1 unit

Lists the versions of a law or regulation, newest first: the adopted text and each consolidated version, with the period each one applied. The app uses it for a question about a past date or about how a text changed. It takes the identifier of the document or of any of its versions, and returns the whole lineage either way.

Each version carries its own identifier, its language, title and source URL. A version applies from validFrom until validTo, the day the next version starts; an empty validTo means no end is known. inForce is true when today falls inside that period. isOriginal marks the adopted text, and consolidationStatus says whether a version is adopted or consolidated. A version whose two dates are equal never applied on its own: an adopted text that a consolidation already replaced, or the final text of a repealed act.

Versions exist for some sources only. For a document without versions the tool returns an error. The app then reads the current text with get_document and says that only the current text was available.

Parameters 4
document_identifier string required
The document, or any one of its versions. For example 32016R0679 for the GDPR.
as_of string, YYYY-MM-DD
Returns only the version in force on this date, one per language. A date that no version covers returns an error.
in_force boolean
true returns only the versions in force today; false returns only the others.
page, num_results integer
Page 1 to 1000, default 1. Versions per page 1 to 100, default 50.

get_document_version

1 unit

Returns the text of one version as markdown, with that version's metadata: the document it belongs to, its validity period, in-force status, language, title and source URL. The app uses it to quote the wording that applied on the date that matters, and states the period next to the quote. It takes the identifier of a version, as listed by get_document_versions.

Parameters 2
version_identifier string required
The version id, from the identifier field of get_document_versions. For example 02016R0679-20160504-eng.
internal_links boolean
true (default) keeps links to other Moonlit documents in the markdown; false keeps the link text only.

get_document_elements

0 units

Lists the articles of a law or regulation, each with the number of documents citing it. The app uses it to find one article inside an instrument and to get the element ids that search_document_citations accepts. Headings alone do not carry the wording; the app asks for the HTML to read a provision. A large code comes in pages, and every page reports the total number of elements. Documents without articles return an empty list.

Parameters 4
document_identifier string required
The law or regulation, for example 32016R0679 for the GDPR.
hierarchy boolean
true (default) returns a nested tree; false a flat list.
include_html boolean
true adds each element's HTML. Default false.
page, num_results integer
Page 1 to 1000, default 1. Elements per page 1 to 100; default 100, or 25 with include_html.

Filters

get_search_filters

0 units

Returns the valid values for one filter: jurisdictions and portals, document types, fields of law, sources, or the portals with semantic coverage. The app calls it when a filtered search needs values it does not have yet; search facets return the same values.

Parameters 6
filter_type string required
document_types, jurisdictions_portals, fields_of_law, sources or semantic_portals.
jurisdictions, portals string[]
For sources only: narrow the list to these jurisdictions or portals.
document_types string[]
For sources only: count documents of these types only.
search string
For sources only: find a body by a part of its name, with its subtree.
limit integer, 1 to 4000
For sources only: bodies kept per category, most documents first. Default 10; otherCount, total and truncated report the cut.
complete boolean
For sources only: every body within a jurisdiction or portal scope, no cut.

Guidance and helpers

get_research_guidance

0 units

Loads Moonlit's research method into the app: how to find the governing law, verify it at the source and keep the evidence for every claim. The three names match the skills; reasoning and memo include the operator guidance. Apps that list server prompts can load the same method through legal_research and legal_memo.

Parameters 2
name string required
moonlit-operator for sourcing and search, moonlit-reasoning for applying law to facts, moonlit-memo for a memo.
version string
Omit for the stable version, 2.0.1. Version 2.0.0 is still served.

convert_to_celex

0 units

Turns a directive or regulation number into its CELEX identifier. Regulation 2016/679 becomes 32016R0679, the GDPR. It formats the reference; reading the document proves the act exists.

Parameters 3
document_type string required
directive or regulation.
year integer required
Publication year, for example 2016.
number string required
The act number. Suffixes such as 13/EU are stripped.

get_account_status

0 units

Reports your plan, the units used and when the count resets. For a signed-in person it also returns the plan limit and the remaining units. For a connection using an MCP key it returns the key's own count; the organization's pooled total is on the Usage tab under Integrations, MCP. No parameters. It costs no units, so deployed services use it as a health check.

What the server tells the app

The server sends its instructions when the app connects. The app follows them without any setup on your side.

  • Which search. Exact terms, citations, counts and facets go to the keyword search; a substantive question goes to search_legal_documents. Both when both matter.
  • The language of the sources. Dutch for the Netherlands, German for Germany, French for France, and several languages where a jurisdiction publishes in more than one. The answer comes in the language you asked in.
  • Scope on one axis. Jurisdictions cover a legal order, portals target collections. Both together widen the set.
  • Filter values come from the server. From get_search_filters or from search facets, never guessed. An unfiltered search needs no lookup.
  • Dates come in pairs. A date filter always has a from-date and an until-date. Dates are confirmed in the document.
  • Read before citing. The app reads the passage with get_document or get_document_elements, copies identifiers exactly, and links the sourceUrl the document carries. In-force status is checked at the provision.
  • The version that applied. For a question about a past date or a changed text, the app finds the version in force on that date with get_document_versions, reads it with get_document_version, and states the version and its period. Where a document has no versions, it says that only the current text was available.
  • A gap is not a finding. No result in the sources consulted is reported as such, never as proof that no authority exists.

Renamed tools

Seven tools carry new names since September 2026. The old names keep working as aliases with the same parameters, so existing prompts and skills run unchanged. Move to the current names when you edit them.

Old nameCurrent name
keyword_searchsearch_legal_documents_by_keyword
hybrid_search_rerankedsearch_legal_documents
hybrid_searchsearch_legal_documents
reference_searchsearch_document_citations
retrieve_documentget_document
get_document_articlesget_document_elements
get_filtersget_search_filters

Citations

Every document has a stable identifier, and every identifier opens on the Moonlit platform:

https://app.moonlit.ai/document/{identifier}/read

Results also carry the source URL of the official publication. A well-grounded answer cites one or both.

The Data API offers the same searches over REST. Its parameter names are camelCase (documentTypes, fieldsOfLaw); the MCP tools use snake_case.
esc
↑↓ navigateenter openesc close