> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bedrock.cv/llms.txt
> Use this file to discover all available pages before exploring further.

# Query

> Get, list, or filter any entity.

Get, list, or filter any entity in the Drawing Index. This is the primary data access tool. Pass an `entity` type with optional filters. No filters returns a list. With `id` returns one entity with full detail and children. With filters returns matching results.

## When to Use

* List all projects, drawings, files, sheets, blocks, or features
* Get a single entity by ID with full detail
* Filter entities by type, discipline, sheet number, grid intersection, and more
* Browse the data hierarchy: project > drawing > sheet > block > feature

## Parameters

| Parameter           | Type      | Required    | Description                                                                                                                 |
| ------------------- | --------- | ----------- | --------------------------------------------------------------------------------------------------------------------------- |
| `entity`            | string    | yes         | Entity type: `"project"`, `"drawing"`, `"file"`, `"sheet"`, `"block"`, or `"feature"`                                       |
| `id`                | string    | no          | Get a single entity by ID                                                                                                   |
| `project_id`        | string    | conditional | Required for all entity types except `"project"`                                                                            |
| `search`            | string    | no          | Substring search across entity-relevant fields                                                                              |
| `drawing_id`        | string    | no          | Filter by drawing (sheets, blocks, features)                                                                                |
| `sheet_id`          | string    | no          | Filter by sheet (blocks, features)                                                                                          |
| `sheet_number`      | string    | no          | Filter by sheet number (sheets, blocks, features)                                                                           |
| `discipline`        | string    | no          | Filter by discipline code: `A`, `E`, `S`, `M`, `P`, `FP` (sheets)                                                           |
| `type`              | string    | no          | Filter by type (block type or feature type)                                                                                 |
| `identifier`        | string    | no          | Block view identifier, e.g. `"3"` for Detail 3 (blocks)                                                                     |
| `label`             | string    | no          | Feature instance label, e.g. `"104"`, `"AHU-1"` (features)                                                                  |
| `block_type`        | string    | no          | Filter features by parent block type                                                                                        |
| `block_identifier`  | string    | no          | Filter features by parent block identifier                                                                                  |
| `block_id`          | string    | no          | Filter features by block (features)                                                                                         |
| `parent_feature_id` | string    | no          | Get children of a feature (features)                                                                                        |
| `grid_intersection` | string    | no          | Spatial filter like `"B-3"` (features)                                                                                      |
| `content_type`      | string    | no          | Filter files by content type (files)                                                                                        |
| `include`           | string\[] | no          | Request additional data. Blocks: `"ocr"`, `"metadata"`, `"overlays"`, `"changes"`, `"clashes"`. Features: `"parent_chain"`. |
| `limit`             | number    | no          | Max results (default 50, max 100)                                                                                           |
| `offset`            | number    | no          | Pagination offset                                                                                                           |

<Info>
  Entity-specific filters are silently ignored for non-applicable types. For example, `discipline` is ignored when querying features.
</Info>

## Response

### List (no `id`)

```json theme={null}
{
  "count": 3,
  "items": [
    {
      "id": "prj_abc",
      "name": "Oak Elementary",
      "description": "K-8 school renovation",
      "drawing_count": 4,
      "created_at": "2025-01-15T10:00:00Z"
    }
  ]
}
```

### Get by ID

When `id` is provided, the response includes full detail and children. For example, getting a project returns its drawings and files. Getting a sheet returns its blocks with relations.

## Examples

### List all projects

```json theme={null}
{
  "entity": "project"
}
```

### Get a project with its drawings and files

```json theme={null}
{
  "entity": "project",
  "id": "prj_abc"
}
```

### Find sheets by discipline

```json theme={null}
{
  "entity": "sheet",
  "project_id": "prj_abc",
  "discipline": "A"
}
```

### Get a sheet by number (returns blocks)

```json theme={null}
{
  "entity": "sheet",
  "project_id": "prj_abc",
  "sheet_number": "A-101"
}
```

### Filter features by type and sheet

```json theme={null}
{
  "entity": "feature",
  "project_id": "prj_abc",
  "sheet_number": "E-201",
  "type": "duplex_receptacle"
}
```

### Get a block with OCR and overlay data

```json theme={null}
{
  "entity": "block",
  "project_id": "prj_abc",
  "id": "blk_a101_plan",
  "include": ["ocr", "overlays", "changes"]
}
```

### Spatial query at a grid intersection

```json theme={null}
{
  "entity": "feature",
  "project_id": "prj_abc",
  "grid_intersection": "B-3",
  "include": ["parent_chain"]
}
```

## Related Tools

* [`Search`](/mcp/tools/search) - Semantic + keyword search when you need fuzzy matching
* [`Ask`](/mcp/tools/ask) - Natural language Q\&A when you want a synthesized answer
* [`ViewImage`](/mcp/tools/get-image) - Convert `uri` fields to viewable URLs
