Skip to main content
Glama

get_oscal_schema

Retrieve the JSON or XSD schema for a specific OSCAL model to understand its structure and validate data.

Instructions

A tool that returns the schema for specified OSCAL model. Try this tool first for any questions about the structure of OSCAL models. By default we return a JSON schema, but schema_type parameter can change that behavior. You can use the list_models tool to get a list of valid model names. Request the complete schema only as a last resort - it's very large and may overflow your context window.

Args: ctx: MCP server context (should be injected automatically by MCP server) model_name: The name of the OSCAL model. If no value is provided, then we return a "complete" schema including all models, which is large. schema_type: json (default) returns the JSON schema; xsd returns the XML Schema (XSD). Other values are rejected.

Returns: str: For json, the schema as a JSON string. For xsd, the schema as XML (XSD) text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_nameNocomplete
schema_typeNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 it does well: it discloses the default output type (JSON), the switch to XSD via `schema_type`, rejection of other values, and the important behavioral warning that the `complete` schema is very large and may overflow the context window. It does not cover auth or rate limits, but for a read-only schema fetch that is a minor gap.

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

Conciseness3/5

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

The first sentences are front-loaded and high-value, but the trailing Args/Returns boilerplate is padded: it documents the injected `ctx` parameter (noise for a caller) and re-explains the return value even though an output schema already exists.

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 two-parameter read tool with an output schema, the description covers purpose, defaults, value domains, and the context-overflow risk, which is enough to invoke it correctly. The only missing element is accurate naming of the model-listing sibling.

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 largely does: `model_name` is explained as selecting a model with 'complete' as the large fallback, and `schema_type` is explained with its `json`/`xsd` values and rejection behavior. It stops short of naming concrete model names, but it points to the tool that lists them.

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?

States a specific verb and resource ('returns the schema for specified OSCAL model') and adds routing intent ('Try this tool first for any questions about the structure of OSCAL models'), which separates it from documentation and query siblings. An agent can identify the tool's role without opening the schema.

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?

Gives explicit when-to-use ('try first for structure questions'), how to find valid inputs ('use the list_models tool'), and an explicit caution against the default-free path ('request the `complete` schema only as a last resort'). The only flaw is that the referenced helper name 'list_models' does not match the actual sibling 'list_oscal_models', which could momentarily confuse routing.

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