Swagger: Validate API
swagger_validate_apiValidate OpenAPI 2.0, 3.0, 3.1, or AsyncAPI definitions to identify structural errors and return line-numbered diagnostics with severity and messages.
Instructions
Validate an OpenAPI or AsyncAPI definition using server-side apidom-ls and asyncapi/parser. Returns structured diagnostics with line number, severity, and message for each finding. Supports OpenAPI 2.0, 3.0, 3.1, and AsyncAPI. Provide either the raw definition (JSON or YAML) OR an existing API by owner, apiName, and version. Use this tool when the user asks to validate, lint, or check an API spec for structural errors matching the Studio Validation tab.
Toolset: Registry API
Parameters:
definition (string): API definition content (OpenAPI/AsyncAPI in JSON or YAML). Provide this or owner/apiName/version, not both.
owner (string): API owner (organization or user). Use with apiName and version to fetch an existing API from the registry.
apiName (string): API name
version (string): Version identifier
maxProblems (number): Cap on the number of findings returned (default 100, max 1000)
uri (string): Optional pseudo-URI hint for the parser (e.g. inmemory://spec.yaml)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "swagger_validate_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Optional pseudo-URI hint for the parser (e.g. inmemory://spec.yaml) | |
| owner | No | API owner (organization or user). Use with apiName and version to fetch an existing API from the registry. | |
| apiName | No | API name | |
| version | No | Version identifier | |
| definition | No | API definition content (OpenAPI/AsyncAPI in JSON or YAML). Provide this or owner/apiName/version, not both. | |
| maxProblems | No | Cap on the number of findings returned (default 100, max 1000) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Detected specification info | |
| valid | No | True if the spec has no error findings | |
| summary | No | ||
| findings | No | List of validation findings | |
| recognized | No | True if the spec was recognized as OpenAPI/AsyncAPI |