Skip to main content
Glama
awslabs
by awslabs

query_component_definition

Query OSCAL Component Definitions to find capabilities and components. Supports searching by UUID, title, or type, with capabilities prioritized over components.

Instructions

Query OSCAL Component Definition documents to find Capabilities and Components.

OSCAL Component Definitions follow a hierarchy: a Component Definition contains Capabilities and Components. A Capability groups related Components and describes a higher-level security function. This tool reflects that hierarchy — when a query matches a Capability (by title or UUID), the Capability is returned directly, including its list of incorporated Components. Only when no matching Capability is found does the search fall through to individual Components.

Prefer querying by Capability name/UUID when exploring what a Component Definition offers. Query by Component only when you need details about a specific service, software, region, or similar leaf-level element.

Use the companion tools to discover valid query filters:

  • list_capabilities() — lists all Capability UUIDs and names

  • list_components() — lists all Component UUIDs and titles

  • list_component_definitions() — lists all Component Definition UUIDs and titles

If you need details about the Component Definition schema, use the tool get_oscal_schema.

Args: ctx: MCP server context (injected automatically by MCP server) component_definition_filter: Optional UUID or metadata.title of a Component Definition to narrow the search scope. Case-insensitive for titles. If omitted, all loaded Component Definitions are searched. query_type: Type of query to perform: - "all": Return all components in the definition(s). Intended for use with a component_definition_filter. Results may be large. For a lightweight summary, use list_components() instead. - "by_uuid": Find a Capability or Component by UUID (requires query_value). Capabilities are checked first. - "by_title": Find a Capability by name or a Component by title (requires query_value). Capabilities are checked first; if no Capability matches, Components are searched with a fallback to property-value matching. - "by_type": Filter Components by type (requires query_value). Does not apply to Capabilities. query_value: The value to search for. Required for by_uuid, by_title, and by_type queries. return_format: Response format. Currently only "raw" is supported, returning complete OSCAL objects as JSON. offset: Zero-based pagination offset (default 0). limit: Maximum items to return, 1-100 (default 10).

Returns: dict: When a Capability matches, the response contains: - capability: Full OSCAL Capability object as JSON - component_count: Number of Components the Capability incorporates - offset, limit, total, hasMore: Pagination metadata (always 0, 1, 1, False for single-capability results) - query_type, component_definitions_searched, filtered_by

When Components are returned instead, the response contains:
    - components: Paginated list of OSCAL Component objects as JSON
    - total_count: Total number of matching Components across all pages
    - offset, limit, hasMore: Pagination metadata
    - query_type, component_definitions_searched, filtered_by

Raises: ValueError: If required query parameters are missing or no data is loaded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
component_definition_filterNo
query_typeNoall
query_valueNo
return_formatNoraw
offsetNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Details hierarchy and fallback logic (Capability first, then Component), pagination behavior, and error conditions (ValueError). No annotations to contradict; description fully discloses relevant traits.

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 sections for purpose, hierarchy, args, returns, raises. Slightly verbose but each sentence adds necessary information. Could be trimmed slightly but remains clear.

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

Completeness5/5

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

Covers behavioral details, parameter semantics, return format, and error handling. References sibling tools for discovery. With no annotations and moderate complexity, description is fully sufficient.

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

Parameters5/5

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

All 6 parameters are described in detail despite 0% schema coverage: component_definition_filter (optional UUID/title), query_type (enum with meanings), query_value (required conditions), return_format (only raw), offset/limit (pagination with defaults). Adds significant meaning beyond schema types.

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 specific verb and resource ('Query OSCAL Component Definition documents to find Capabilities and Components'), clearly distinguishing from sibling tools like list_capabilities or query_catalog.

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

Usage Guidelines5/5

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

Explicitly provides when to use: prefer querying by Capability, query by Component only for leaf-level details. Recommends companion tools for discovering filters.

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