List Spectral Rules
list_rulesRetrieve validation rule codes, descriptions, and severities from Italian PA Spectral rulesets to inspect required API checks before running compliance validation.
Instructions
List available validation rules from an Italian PA Spectral ruleset.
Returns a JSON array of rule objects, each with code, description, and severity.
Args:
standard_ruleset (string, optional): One of 'spectral', 'spectral-full', 'spectral-generic', 'spectral-security'. Default: 'spectral'.
ruleset_path (string, optional): URL or local path to a custom ruleset. Overrides standard_ruleset.
Returns: JSON array of objects: [ { "code": "has-contact", "description": "API MUST reference a contact...", "severity": "error" } ]
Examples:
List core Italian PA rules: { "standard_ruleset": "spectral" }
List security rules: { "standard_ruleset": "spectral-security" }
Use a custom ruleset: { "ruleset_path": "https://example.com/my-rules.yml" }
Error Handling:
Returns an error if the ruleset URL is unreachable or the YAML is invalid.
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": "list_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ruleset_path | No | URL or absolute local path to a Spectral ruleset file. Overrides standard_ruleset. | |
| standard_ruleset | No | Standard Italian PA ruleset: 'spectral' (default), 'spectral-full', 'spectral-generic', 'spectral-security'. |