Skip to main content
Glama

validate_oscal_content

Validate OSCAL JSON content through well-formedness, JSON Schema, OSCAL model semantics, and NIST oscal-cli checks; auto-detect model type if omitted.

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. Model - Semantic checks via OSCAL 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the four-level ordering, that Levels 2-4 are skipped when Level 1 fails, that Level 4 gracefully skips without oscal-cli, and that overall validity requires all non-skipped levels to pass. It omits the non-mutating/read-only nature and any performance caveat, keeping it just short of a 5.

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

Conciseness5/5

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

Front-loaded with a one-line purpose, followed by the numbered pipeline and then terse Args/Returns. The ordering of information matches how an agent reads it, and no sentence is redundant.

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

Completeness4/5

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

For a validation tool with no output schema, the description covers inputs, processing behavior, skip semantics, and a one-line return summary ('structured validation results with per-level detail'). A little more on the return shape or error signaling would complete it, but it is sufficient to invoke correctly.

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?

Schema description coverage is 0%, so the description must compensate, and it does: the Args block explains 'content' is the OSCAL JSON string and that the optional 'model_type' is auto-detected from the root key when omitted. That auto-detection rule is genuine semantics unavailable in the schema.

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

Purpose4/5

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

States a specific verb+resource ('Validate OSCAL JSON content') and adds real scope via 'multi-level validation pipeline'. It does not explicitly name the closest sibling validate_oscal_file, so the agent must infer the content-vs-file distinction from the noun.

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

Usage Guidelines3/5

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

The pipeline description implies this is for raw in-memory content, and the skip rules tell the agent what to expect, but there is no explicit when-to-use versus validate_oscal_file or when-not guidance. Usage must be inferred from the surrounding tool list.

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