Skip to content

Tool Schemas

The HTTP API maps directly to five LLM tools. Use these definitions to give an AI agent access to MidLyr’s compliance-source catalog and analysis APIs.

{
"name": "browseRegulatoryLibrary",
"description": "Search the Midlyr compliance-source catalog — the full body of rules a US bank or fintech must follow. Covers statutes, CFR regulations, interagency and agency guidance, examination handbooks, interpretive actions, and SRO rules (FINRA, NACHA, MSRB, NFA). Pass the user's natural-language question as `query` to rank by relevance, and/or pass structured filters to narrow by category, authorities, or jurisdictions. All parameters are optional and composable.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Natural-language query. Matches against document title, authority name, and description. Optional; when omitted, results are ordered by most recently updated."
},
"category": {
"type": "array",
"items": {
"type": "string",
"enum": [
"statute",
"regulation",
"interagencyGuidance",
"agencyGuidance",
"examinationHandbook",
"interpretiveAction",
"sroRule"
]
},
"description": "Optional. Filter by document category. Values are OR'd; omit to search all categories."
},
"authorities": {
"type": "array",
"items": { "type": "string" },
"description": "Optional. Filter by issuing authority id. Examples: 'cfpb', 'occ', 'fdic', 'fincen', 'ofac', 'fed', 'ncua', 'ffiec', 'finra', 'nacha', 'congress', 'ny-dfs'. Values are OR'd."
},
"jurisdictions": {
"type": "array",
"items": { "type": "string" },
"description": "Optional. Filter by jurisdiction id. Examples: 'us-federal', 'us-state:ny', 'us-state:ca'. Values are OR'd."
},
"cursor": {
"type": "string",
"description": "Opaque pagination cursor from a prior response. Reuse only with the same query and filters."
}
},
"required": []
}
}
{
"name": "readRegulatoryDocument",
"description": "Fetch a compliance document's metadata, total size, and table of contents. The document body text is served by readRegulatoryContent — call that tool when the agent needs text. Use readRegulatoryDocument first to discover the TOC, then readRegulatoryContent with an offset to read a specific section.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable document id from a browseRegulatoryLibrary result."
}
},
"required": ["id"]
}
}
{
"name": "readRegulatoryContent",
"description": "Fetch a slice of a regulatory document's plain text along with the full Regulation Detail Object. Use `offset` and `limit` for random access. The response always includes `details` with the full document metadata.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stable document id from a browseRegulatoryLibrary result."
},
"offset": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Character position to start reading from. Default 0 (start of document)."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 40000,
"default": 40000,
"description": "Max characters to return. Default and maximum 40000 (~10,000 tokens)."
}
},
"required": ["id"]
}
}
{
"name": "startComplianceScreening",
"description": "Submit text for asynchronous compliance screening. Returns a job id. Use this before showing, sending, or approving customer messages, agent responses, generated documents, marketing copy, or other regulated content. The job result returns compliance findings with regulatory citations.",
"inputSchema": {
"type": "object",
"properties": {
"content": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["text"],
"description": "Content type. v1 supports text."
},
"text": {
"type": "string",
"description": "Text to screen for compliance risk."
}
},
"required": ["type", "text"]
},
"scenario": {
"type": "string",
"enum": [
"marketing_asset",
"dispute",
"debt_collection",
"complaint",
"generic"
],
"description": "Purpose of the text being screened. Selects the specialized screening context. Pick the value that describes what the text is for end-to-end: marketing_asset (outbound promotional content), dispute (transaction/billing error handling), debt_collection (collections communications), complaint (responses to consumer complaints), or generic (anything that does not fit a specialized bucket)."
}
},
"required": ["content", "scenario"]
}
}
{
"name": "getJob",
"description": "Retrieve the status and typed result of an async job. Poll until status is succeeded or failed (those two states are terminal). When type is screen_analysis and status is succeeded, result is { type, riskScore, findings } — a result type discriminator, risk score, and list of compliance findings, each with priority, details, and regulatory citations.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Job id returned by an async submit tool such as startComplianceScreening."
}
},
"required": ["id"]
}
}