Skip to main content
Glama
awslabs
by awslabs

validate_oscal_content

Validates OSCAL JSON content using a multi-level pipeline: checks JSON validity, schema conformance, semantic rules, and full NIST validation when available.

Instructions

Validate OSCAL JSON content through a multi-level validation pipeline.

Runs up to four validation levels in sequence:

  1. Well-formedness - Is it valid JSON and a JSON object?

  2. JSON Schema - Does it conform to the NIST OSCAL JSON schema?

  3. Trestle - Semantic checks via compliance-trestle Pydantic models

  4. oscal-cli - Full NIST validation if oscal-cli is installed

If Level 1 fails, Levels 2-4 are skipped. If oscal-cli is not installed, Level 4 is gracefully skipped. The overall result is valid only when all non-skipped levels pass.

Args: ctx: MCP server context (injected automatically by MCP server) content: OSCAL JSON content as a string model_type: Optional OSCAL model type (e.g. "catalog", "profile"). If omitted, the model type is auto-detected from the root key.

Returns: dict: Structured validation results with per-level detail

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
model_typeNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It details the four-level validation pipeline, skipping behavior on failures, and graceful handling of missing oscal-cli. It discloses that result is valid only when all non-skipped levels pass. Could mention error handling for Level 1 failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with bullet points and clear sections. Front-loads purpose. Slightly verbose with level details but overall efficient for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without output schema, description mentions returns dict with per-level detail but does not specify the exact structure. Covers main behaviors but could be more precise on return format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds meaning: explains 'content' as OSCAL JSON string, and 'model_type' as optional with auto-detection from root key. Provides examples like 'catalog', 'profile'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool validates OSCAL JSON content through a multi-level pipeline, with specific verb 'validate' and resource. It distinguishes from the sibling 'validate_oscal_file' by focusing on content rather than a file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context on when to use: to validate OSCAL JSON content. Describes the pipeline behavior including skipping levels. However, it does not explicitly contrast with the sibling 'validate_oscal_file', which could be an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awslabs/mcp-server-for-oscal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server