loader
_loader
¶
Utility for loading markdown prompt files with disk-read caching.
Layout of prompts/markdown/:
instructions/-- what the server tells every client at connect time.workflows/-- one file per subject, named after the SideFX help scope it draws on, served by the MCP prompts.shared/-- fragments injected into the above, never served alone.
Callers pass the path relative to markdown/, e.g. workflows/pyro.md, so
which of the three kinds a file is stays visible at every call site.
Functions:
| Name | Description |
|---|---|
load_markdown |
Load a markdown prompt file, optionally formatting placeholders. |
markdown_exists |
Whether a markdown prompt file ships under |
Functions:¶
load_markdown
¶
Load a markdown prompt file, optionally formatting placeholders.
File contents are cached after the first read — the files never change at runtime, so this avoids repeated disk I/O on every prompt invocation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Path relative to the |
required |
|
str
|
Values to substitute into |
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The formatted markdown string. |