MD_UPDATE_GUIDE
Preview
This feature is in preview and is subject to change.
Append a version to an existing Guide, identified by ID. Omit content to update only metadata such as references without changing the text.
Syntax
SELECT * FROM MD_UPDATE_GUIDE(
id = '<guide_uuid>',
content = '# Updated content...',
change_comment = 'Clarify trial subscription exclusion'
);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The Guide's UUID. |
content | VARCHAR | No | New full markdown body. Omit to carry the current version's content forward. |
change_comment | VARCHAR | No | Note describing this version's change. |
external_id | VARCHAR | No | Caller-provided ID for this version (for example a git SHA). |
"references" | STRUCT[] | No | Replaces the Guide's references. Pass an empty list ([]) to clear references; omit to carry them forward. See reference struct. |
Return columns
Same as MD_CREATE_GUIDE.
Examples
Update the full content of a Guide:
SELECT id, current_version
FROM MD_UPDATE_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
content = '# MRR and ARR Definitions (Updated) ...',
change_comment = 'Add ARR calculation section'
);
Add references without changing content:
SELECT current_version
FROM MD_UPDATE_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
"references" = [
{
'type': 'catalog',
'url': 'md:billing',
'schema': 'main',
'table': 'subscriptions'
}
]
);
Clear all references:
SELECT current_version
FROM MD_UPDATE_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
"references" = []
);
Related
MD_GET_GUIDE— Read the current content before updating.MD_LIST_GUIDE_VERSIONS— Browse the version history.MD_UPDATE_GUIDE_METADATA— Retitle or re-topic without a content version.update_guideMCP tool — AI assistant equivalent.