Lint document
lint_documentLint OpenAPI, AsyncAPI, or Arazzo documents against a ruleset to return sorted diagnostics and counts, so you can identify specification issues before publishing or generating code.
Instructions
Lints an OpenAPI (2.0/Swagger, 3.x), AsyncAPI or Arazzo document with an OpenLint ruleset. Pass the document text as content. counts cover every result, whatever severity and limit are; diagnostics are sorted most severe first, then by code, and grouped by code unless groupBy is "none". formats lists the formats the ruleset recognized; empty means none. External $refs to files and URLs are not followed; they are reported as invalid-ref.
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": {
"content": "<content>"
},
"name": "lint_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Most diagnostics (or groups) to return | |
| content | Yes | The document, as YAML or JSON text | |
| groupBy | No | "code" returns one entry per rule, with a count | code |
| ruleset | No | A ruleset name from list_rulesets (or oas, asyncapi, arazzo), or an inline YAML/JSON ruleset. Default: the default ruleset. | |
| filename | No | A name for the document, such as "openapi.json". It is never read from disk. A .json name selects the JSON parser (otherwise YAML), and the ruleset's overrides match against it. Default: document.yaml. | |
| severity | No | Leave out diagnostics less severe than this. Counts still include them. | hint |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Hints about the result, such as unfollowed external $refs | |
| counts | Yes | ||
| formats | Yes | ||
| truncated | Yes | Whether `limit` cut the list | |
| diagnostics | Yes |