Skip to main content
Glama

List compartments

list_compartments
Read-onlyIdempotent

Retrieve compartments recursively within an OCI tenancy, starting from the tenancy root or a given OCID, while filtering out those outside the allowlist.

Instructions

List compartments in the tenancy (recursively). Compartments outside the allowlist are filtered out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootCompartmentIdNoOCID to list under (defaults to the tenancy root)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the bar is lower. The description contributes genuinely new behavior: results are recursive and silently filtered by an allowlist, which warns the agent that the returned set may be incomplete.

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 short sentences, zero waste, with the core action front-loaded before the caveat about filtering.

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 single-optional-parameter read tool with a full annotation set, the description covers action, scope, recursion, and result filtering. Minor gaps remain (no mention of pagination or output shape), but nothing critical to correct invocation is missing.

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?

Only one parameter exists and the schema already documents it fully ("OCID to list under (defaults to the tenancy root)"), giving a baseline of 3. The description adds no syntax, format, or default nuance beyond 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 and resource ("List compartments") plus scope ("in the tenancy") and a mode qualifier ("recursively"). It does not, however, distinguish itself from the close sibling list_compartment_resources, so an agent must infer the difference.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over list_compartment_resources, search_resources, or get_resource. The allowlist sentence describes result filtering, not usage context, so the agent gets no routing help.

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