Skip to main content
Glama

query_documents

Return loaded OSCAL documents of one model type with metadata and childTypeCounts. For child elements, use list_child_elements, then get_child_element.

Instructions

Return loaded OSCAL documents of one model type with metadata and childTypeCounts. For child elements, use list_child_elements, then get_child_element.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model_type": "<model_type>"
    },
    "name": "query_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum items per page, 1-100.
offsetNoZero-based index of the first item.
model_typeYesModel type of the loaded documents.
query_typeNo"all" (paged), "by_uuid", or "by_title" (exact, then full-text).all
query_valueNoUUID or title to match. Required for by_uuid and by_title.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. 'Return' implies a read-only operation and it discloses that results include metadata and childTypeCounts, which is useful. It says nothing about ordering, pagination behavior, or whether unloaded/unsupported model types error out — though pagination is covered in the schema.

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?

Two sentences, zero filler. The primary behavior is front-loaded and the follow-up routing sentence is compact and actionable.

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?

There is no output schema, and the description compensates by naming what comes back (metadata, childTypeCounts). Combined with full schema coverage of five parameters, this is nearly complete; only the relationship to list_documents and result ordering are left open.

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

Parameters3/5

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

Schema description coverage is 100%, so model_type, limit, offset, query_type and query_value are all documented in the schema, including the enum semantics and the 'required for by_uuid and by_title' note. The description adds only the notion of scoping to 'one model type', so the baseline 3 applies.

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 and resource: 'Return loaded OSCAL documents of one model type', and names the return payload ('metadata and childTypeCounts'). It does not differentiate itself from the sibling list_documents, which sounds like it also returns documents, so an agent cannot fully resolve the choice from the description alone.

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?

Gives explicit routing for one case: 'For child elements, use list_child_elements, then get_child_element.' That is a genuine when-not statement. However, there is no guidance on when to pick this over list_documents or query_oscal_documentation, and the all/by_uuid/by_title selection lives only in the schema.

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