list_compartments
Resolve an OCI compartment name to its OCID by listing compartments under a parent or across the tenancy, for use with other tools.
Instructions
Lists compartments by name and/or parent compartment. Use this to resolve a compartment name (e.g. "cpLinux") to its OCID before calling other tools. Defaults to searching the entire tenancy tree from the root compartment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Exact compartment name to filter by (e.g. "cpLinux", "cpFiles") | |
| compartmentId | No | Parent compartment OCID to search under (default: tenancy root) | |
| includeSubtree | No | Search the whole hierarchy below the parent compartment (default: true) |