folio-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FOLIO_MCP_LOCAL | No | Set to '1' or 'true' to enable local mode instead of API mode. | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Access FOLIO, the Federated Open Legal Information Ontology. Search, browse, and export 18,000+ legal concepts covering areas of law, document types, legal entities, and more.
Workflow:
search_concepts(query) — START HERE: find concepts by name or synonym. Use short legal terms ('noncompete agreement', 'motion to dismiss'), not sentences; for a paragraph of facts, search its key terms one at a time.
get_concept(iri) — full record for one concept (definition, synonyms, translations, parents/children, identifiers).
list_branches() / get_taxonomy_branch(branch_name) — browse a branch by name (e.g., 'areas_of_law', 'document_artifacts').
get_children(iri) / get_parents(iri) — navigate the hierarchy one level at a time.
query_concepts(...) — exact filters (label/definition substring, branch, parent). search_definitions is a loose fallback; verify its hits by reading the definitions.
IRIs look like 'https://folio.openlegalstandard.org/R07tQM...' or short IDs like 'R07tQM...'. Never invent IRIs; get them from search results. Branch names like 'areas_of_law' are accepted wherever an IRI is (they mean the branch's root concept).
List results are compact {iri, label, definition} with long definitions shortened; use get_concept(iri) for the full record. Errors come back as {error, hint}.
When citing a concept, give its label and IRI.
Classification workflows (available as slash commands):
/folio:classify-document — classify a legal document against the document_artifacts taxonomy
/folio:identify-area-of-law — identify areas of law for a legal situation
/folio:classify-entity — classify a legal entity against actors_players and legal_entities
/folio:classify-industry — classify the industry sector for a matter or client
/folio:identify-legal-authority — identify the type of legal authority (statute, regulation, etc.)
/folio:classify-event — classify a legal event (dispute, transaction, regulatory, etc.)
/folio:identify-service-type — identify the type of legal service needed
/folio:identify-forum-venue — identify the appropriate forum, venue, or governmental body
/folio:identify-objective — identify legal objectives for a matter
/folio:classify-asset — classify an asset type (tangible, intangible, financial, estate)
/folio:identify-engagement-terms — identify engagement terms for a legal services arrangement Suggest these when users need to classify, categorize, or identify legal concepts.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_conceptsA | Find FOLIO concepts by name. START HERE for almost every question. Fuzzy-matches the query against concept labels and synonyms (alternative labels, abbreviations, translations of names). Works best with a short legal term or noun phrase, not a sentence: "noncompete agreement", "motion to dismiss", "landlord tenant", "LLC", "breach of contract". For a paragraph of facts, pick out the key legal terms and search each one. Args: query: A short concept name (2-6 words). limit: Maximum results (default 10, max 50). Returns: JSON array of {iri, label, definition, score}; score is 0-100, higher is better. Pass an iri to get_concept for the full record. |
| search_definitionsA | Fuzzy search over concept DEFINITIONS. Fallback only — use search_concepts first. Ranking is loose: results often share only a few common words with the query, so read each definition before relying on a hit. For an exact word or phrase inside definitions, query_concepts(definition="...") is more precise. Args: query: A short descriptive phrase (e.g. "duty of loyalty to beneficiaries"). limit: Maximum results (default 10, max 50). Returns: JSON array of {iri, label, definition, score}. |
| get_conceptA | Get the full record for one FOLIO concept: definition, synonyms, translations, examples, parent/child IRIs, identifiers and cross-references. Args: iri: A full IRI ("https://folio.openlegalstandard.org/RSYBzf149Mi5KE0YtmpUmr"), a short ID ("RSYBzf149Mi5KE0YtmpUmr"), or a branch name such as "areas_of_law" (returns that branch's root concept). Not a free-text name — use search_concepts to find the IRI first. Returns: JSON object with all non-empty fields, or {error, hint}. |
| export_conceptA | Export one FOLIO concept as Markdown, JSON-LD or OWL/XML (for documents or other systems). For reading a concept yourself, get_concept is more compact. Args: iri: The concept IRI or short ID. format: "markdown" (default), "jsonld", or "owl_xml". Returns: The concept in the requested format, or {error, hint}. |
| list_branchesA | List the 24 top-level FOLIO taxonomy branches with their number of top-level concepts (e.g. areas_of_law, document_artifacts, legal_entities, actors_players, industries, locations). Returns: JSON object mapping branch name to top-level concept count. |
| get_taxonomy_branchA | Browse the top-level concepts of a FOLIO taxonomy branch. Args: branch_name: A branch name from list_branches(), e.g. "areas_of_law", "document_artifacts", "actors_players". Close variants such as "Areas of Law" or "AREA_OF_LAW" are accepted. max_depth: 1 (default) = top level only. Up to 3, but deeper levels can be large; prefer get_children(iri) on the relevant concept. Returns: JSON array of {iri, label, definition} (definitions shortened; use get_concept for full text). Large results are capped at 100 items and returned as {results, truncated, total, note}. |
| get_childrenA | Get the narrower (child) concepts of a FOLIO concept. Args: iri: A concept IRI or short ID. A branch name such as "areas_of_law" is also accepted and returns that branch's top-level concepts. max_depth: 1 (default) = direct children. Up to 3; prefer drilling down one level at a time. Returns: JSON array of {iri, label, definition}; capped at 100 items as {results, truncated, total, note}. |
| get_parentsA | Get the broader (parent) concepts of a FOLIO concept. A concept can have several parents (FOLIO is a polyhierarchy). Args: iri: A concept IRI or short ID. max_depth: 1 (default) = direct parents; up to 3 for grandparents etc. Returns: JSON array of {iri, label, definition}. Empty for a branch root. |
| get_propertiesA | List all FOLIO object properties (relationship types such as "folio:advised", "folio:drafted", "folio:isGovernedBy", "oasis:hasActor"). Compact listing: iri, label and short definition only. For domain/range details, or to filter, use query_properties. Returns: JSON array of {iri, label, definition}. |
| find_connectionsA | Find explicit property links (subject -> property -> object triples) from a FOLIO concept, e.g. Actor / Player -folio:drafted-> Document / Artifact. FOLIO records only a small number of these links (mostly on top-level classes), so most concepts have none. For broader/narrower relationships use get_parents/get_children; for related concepts see "see_also" in get_concept. Args: subject_iri: IRI or short ID of the subject concept (branch names accepted). property_name: Optional property label (e.g. "folio:drafted") or IRI. object_iri: Optional object concept IRI to filter by. Returns: JSON array of {subject, property, object} (each {iri, label}), or {results: [], note} when the concept has no recorded links. |
| query_conceptsA | Filter FOLIO concepts by exact field matches and structure (not ranked). Use this for precise filters, e.g. every area of law whose label contains "tax", or concepts whose definition mentions "fiduciary". For "find the concept called X", search_concepts ranks better. All filters are ANDed; give at least one. Text filters: label: Match the primary label. definition: Match the definition text. alt_label: Match alternative labels / synonyms. example: Match examples. any_text: Match any text field (label, definition, synonyms, examples, notes). Structural filters: branch: Branch name from list_branches(), e.g. "areas_of_law" (also accepts "AREA_OF_LAW"). parent_iri: Only descendants of this concept (IRI, short ID or branch name). has_children: True = non-leaf concepts only, False = leaf concepts only. deprecated: Include deprecated concepts (default False). country: Match the country field. Control: match_mode: "substring" (default, case-insensitive), "exact", "regex", or "fuzzy". limit: Maximum results (default 20, max 100). Returns: JSON array of {iri, label, definition}. |
| query_propertiesA | Filter FOLIO object properties (relationship types), with full domain/range detail. Text filters: label: Match the property label, e.g. "advised", "drafted", "governed", "hasActor". definition: Match the property definition. Structural filters: domain_iri: Only properties whose domain includes this class IRI. range_iri: Only properties whose range includes this class IRI. has_inverse: True = only properties with inverses, False = only without. Control: match_mode: "substring" (default), "exact", "regex", or "fuzzy". limit: Maximum results (default 20, max 100). Returns: JSON array of {iri, label, definition, domain, range, inverse_of, sub_property_of}. |
| extract_conceptsA | Tag a passage of text with the FOLIO concepts it mentions. Paste a fact pattern, clause, email, or brief excerpt; returns every FOLIO concept whose label or synonym appears in it (e.g., "tenant", "eviction", "temporary restraining order", "Bankruptcy Court", "EEOC"), with its branch. Dictionary matching, not inference: use it as a fast first pass, then get_concept(iri) or the classification prompts for judgment calls. The first call builds the label index (about 2s). Args: text: The text to tag (up to 100,000 characters). limit: Maximum concepts to return, in order of first mention (default 50). branch: Optional branch filter, e.g. "areas_of_law", "document_artifacts", "actors_players", "forum_venues" (see list_branches). Returns: JSON {"count", "concepts": [{iri, label, branch, match_type, matched_text, count, first_offset}]}. |
| search_expandedA | Search FOLIO with a plain-English question or fact pattern. An LLM rewrites the query into synonyms and legal terms of art (e.g. "my landlord won't fix the heat" -> "Implied Warranty of Habitability", "Constructive Eviction"), searches each, and merges the results by rank. Use this for natural-language or situational queries; use search_concepts when you already know the concept's name. The first call for a query takes a few seconds; repeats are cached. If the LLM is unavailable it returns plain label-search results with an empty expansions list. Args: query: Natural-language description (e.g., "fired for reporting safety violations"). limit: Maximum results (default 10, max 50). include_definitions: Also match concept definitions (default false). Returns: JSON object: query, expansions, expansion_source ("llm", "cache" or "none"), and results [{iri, label, definition, score, matched_via}]. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| classify-document | Classify a legal document using the FOLIO ontology. Provide a document name or description and get the best FOLIO classification. |
| identify-area-of-law | Identify the area(s) of law that apply to a legal situation or matter. |
| classify-entity | Classify a legal entity (person, organization, role) using FOLIO. |
| classify-industry | Classify the industry for a legal matter, client, or company using the FOLIO ontology's industries taxonomy (21 sectors). |
| identify-legal-authority | Identify the type of legal authority (statute, regulation, case law, treaty, executive order, etc.) using the FOLIO ontology's legal_authorities taxonomy. |
| classify-event | Classify a legal event (dispute, transaction, regulatory action, bankruptcy filing, employment action, etc.) using the FOLIO ontology's events taxonomy. |
| identify-service-type | Identify the type of legal service needed for a matter — advisory, transactional, dispute, regulatory, or bankruptcy/restructuring. |
| identify-forum-venue | Identify the appropriate forum, venue, or governmental body for a legal dispute or regulatory matter using the FOLIO ontology. |
| identify-objective | Identify the legal objectives for a matter — litigation claims/defenses, transactional goals, regulatory filings, risk management, etc. |
| classify-asset | Classify an asset as tangible, intangible, financial, or estate using the FOLIO ontology's asset_types taxonomy. |
| identify-engagement-terms | Identify the engagement terms for a legal services arrangement — fee model, invoice terms, engagement type, and billing details. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| branches_resource | FOLIO taxonomy branch names with concept counts. |
| stats_resource | FOLIO ontology statistics. |
TDQS
Scored across 14 tools
The numerous search tools (search_concepts, search_definitions, search_expanded, query_concepts, extract_concepts) are unusually well-differentiated by explicit guidance ('START HERE', 'Fallback only', precise filters, natural-language queries), so an agent can pick correctly. The one genuine overlap is get_taxonomy_branch vs get_children: both accept a branch name and return that branch's top-level concepts, and get_children vs find_connections both touch related-concept traversal.
Every tool follows a clean snake_case verb_noun pattern (search_concepts, get_concept, query_properties, extract_concepts, list_branches). The verb choice is semantically meaningful and consistent across search/get/list/query/export families.
14 tools is squarely within the ideal range and each maps to a distinct capability (search, retrieve, navigate, filter, extract, export). Nothing feels redundant or padded for a taxonomy-browsing server.
The read-only surface is thorough for a taxonomy server: discovery, full-record retrieval, hierarchical navigation (parents/children/branches), property filtering, relation triples, text extraction, and export all exist. Minor gaps: no batch get_concept for multiple IRIs at once (a common post-search step) and subtree traversal is capped at depth 3, forcing iterative drill-down.