Tools

The nine 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 calls are counted

Your plan has a monthly number of calls. Every search, document read and filter lookup costs one call. Three tools are free: 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 call
search_legal_documents_by_keywordFind exact words, citations or article numbers. Boolean operators, counts, facets.1 call
search_document_citationsFind what cites a document, or what it cites, down to the article.1 call
get_documentRead one document in full, with its metadata and source link.1 call
get_document_elementsList the articles of a law or regulation, with citation counts.1 call
get_search_filtersLook up valid jurisdictions, portals, document types, fields of law and sources.1 call
get_research_guidanceLoad Moonlit's research method: operator, reasoning or memo.Free
convert_to_celexTurn a directive or regulation number into its CELEX identifier.Free
get_account_statusSee your plan, calls used and when the count resets.Free

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 call

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 call

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 call

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.

Parameters 14
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.
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 call

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 1
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.

get_document_elements

1 call

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. Documents without articles return an empty list.

Parameters 3
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.

Filters

get_search_filters

1 call

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

Free

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.0.

convert_to_celex

Free

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

Free

Reports your plan, the calls used and when the count resets. For a signed-in person it also returns the plan limit and the remaining calls. For a connection using an MCP key it returns the key's own count; the organization's pooled total is in the organization settings. No parameters. Free, 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.
  • 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