# MD_GET_GUIDE
> Read a Guide's full content by id, optionally at a historical version
Read a [Guide](/key-tasks/guides/)'s full markdown content by ID, optionally at a specific historical version.

## Syntax

```sql
SELECT * FROM MD_GET_GUIDE(id = '<guide_uuid>');

-- Read a specific version
SELECT * FROM MD_GET_GUIDE(id = '<guide_uuid>', version = 2);
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | `UUID` | Yes | The guide's UUID, as returned by `MD_LIST_GUIDES` or `MD_CREATE_GUIDE`. |
| `version` | `UINTEGER` | No | Historical version number to read. Defaults to the current version. |

## Return columns

| Column | Type | Description |
|--------|------|-------------|
| `id` | `UUID` | Unique identifier of the guide |
| `topic` | `VARCHAR` | Grouping label (`NULL` for guides without a topic) |
| `title` | `VARCHAR` | Guide title |
| `description` | `VARCHAR` | One-line summary |
| `owner_id` | `UUID` | UUID of the guide owner |
| `owner_name` | `VARCHAR` | Name of the guide owner |
| `access` | `VARCHAR` | `'user'` (private) or `'organization'` (org-wide) |
| `current_version` | `UINTEGER` | Latest version number |
| `created_at` | `TIMESTAMP WITH TIME ZONE` | When the guide was created |
| `updated_at` | `TIMESTAMP WITH TIME ZONE` | When the guide was last updated |
| `version` | `UINTEGER` | The version being read |
| `version_change_comment` | `VARCHAR` | Note for this version |
| `version_external_id` | `VARCHAR` | Caller-provided version ID |
| `version_created_at` | `TIMESTAMP WITH TIME ZONE` | When this version was created |
| `references` | `STRUCT[]` | Structured references attached to this version. Guide, Dive, and Flight references resolve to `guide_id`, `dive_id`, and `flight_id` UUIDs. |
| `content` | `VARCHAR` | Full markdown content |

## Examples

Read the current version of a guide:

```sql
SELECT topic, title, content
FROM MD_GET_GUIDE(id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890');
```

Read version 2 of a guide:

```sql
SELECT version, version_change_comment, content
FROM MD_GET_GUIDE(
  id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
  version = 2
);
```

## Related

- [`MD_LIST_GUIDES`](../md-list-guides) — Find a guide's ID.
- [`MD_LIST_GUIDE_VERSIONS`](../md-list-guide-versions) — Browse a guide's version history.
- [`MD_UPDATE_GUIDE`](../md-update-guide) — Append a version.
- [`get_guide` MCP tool](/sql-reference/mcp/guides/get-guide) — AI assistant equivalent.


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Fmotherduck-sql-reference%2Fguides%2Fmd-get-guide%2F&page_title=MD_GET_GUIDE&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
