# DESCRIBE

> DESCRIBE in StackQL: list the fields of a resource, or the parameters and return type of a specific method, before you query or mutate it.

Source: https://stackql.io/language-spec/describe

Describes a resource or a specific method on a resource.

See also:
[[ StackQL Resource Hierarchy ]](/getting-started/resource-hierarchy)

* * *

## Syntax

*describeStatement::=*

&nbsp;
&nbsp;

```sql
DESCRIBE [ METHOD ] [ EXTENDED ] <multipartIdentifier> ;
DESC [ EXTENDED ] <multipartIdentifier> ;
```

`DESC` is accepted as an alias for `DESCRIBE` when describing a resource; `DESCRIBE METHOD` requires the full keyword.

## Response

**DESCRIBE**

| Column | Description |
| --- | --- |
| `name` | Field name |
| `type` | Datatype (`string`, `integer`, `boolean`, `number`, `object`, `array`) |
| `description` | Field description (if `EXTENDED` is supplied) |

**DESCRIBE METHOD**

| Column | Description |
| --- | --- |
| `name` | Field name |
| `type` | Datatype (`string`, `integer`, `boolean`, `number`, `object`, `array`) |
| `param_type` | `input_required`, `input_optional`, or `output` |
| `shape` | JSON Schema subset for object and array fields; empty for scalars. Includes nested `properties`, `items`, `required`, `enum`, `default`, `description`, and optionally includes booleans if made available by the provider (`readOnly`, `writeOnly`, `deprecated`) |
| `description` | Field description (if `EXTENDED` is supplied) |

* * *

## Examples

### Basic `DESCRIBE` Statement
Run a basic DESCRIBE statement to list the fields in a resource from an authenticated session.

```sql
-- Show the available fields in a Compute Engine resource
DESCRIBE google.compute.instances;
```

### Extended `DESCRIBE` Statement
Run an extended DESCRIBE statement to list the fields in a resource and their descriptions from an authenticated session.

```sql
-- Show the available fields in a Compute Engine resource
DESCRIBE EXTENDED google.compute.instances;
```

### `DESC` Alias
`DESC` is shorthand for `DESCRIBE` on a resource, with or without `EXTENDED`.  It is treated as a read-only statement everywhere `DESCRIBE` is, including the MCP server's `run_select_query` tool in `read_only` and `safe` modes.

```sql
-- Same result as DESCRIBE EXTENDED google.compute.instances
DESC EXTENDED google.compute.instances;
```

### Basic `DESCRIBE METHOD` Statement
Introspect a single method on a resource. The result includes input parameters and response fields, with nested structure rendered in the `shape` column.

```sql
-- Show the inputs and outputs for the buckets.get method
DESCRIBE METHOD google.storage.buckets.get;
```

### Extended `DESCRIBE METHOD` Statement
Run an extended DESCRIBE METHOD statement to include per-field descriptions alongside the shape.

```sql
-- Show inputs, outputs, and descriptions for the buckets.insert method
DESCRIBE METHOD EXTENDED google.storage.buckets.insert;
```

### Discovering an `INSERT` Payload
`DESCRIBE METHOD` is the canonical way to discover what fields an `INSERT` (or any mutating method) accepts. The `shape` column carries nested structure agents and humans can use to construct a payload in one query.

```sql
-- See what google.compute.instances.insert requires
DESCRIBE METHOD EXTENDED google.compute.instances.insert;
```
