get_prompt tool retrieves complete details for a single prompt, including the full content of its latest version and extracted variable names.
Access Control
- Authenticated users: Can access their own prompts (public or private) OR any other user’s public prompts
- Anonymous callers: Can only access public prompts (
is_public = true) - Private prompts: Attempting to access another user’s private prompt returns
PROMPT_NOT_FOUND(does not reveal existence to prevent enumeration attacks)
Parameters
UUID of the prompt to retrieve. Must be a valid UUID format.
Response
Returns aGetPromptResult object with complete prompt details.
Unique UUID identifier for the prompt
Prompt title
Optional description of the prompt
Full content of the prompt’s latest version. This is the template that may contain
{{variable}} placeholders.Array of variable names extracted from the content using
{{variable}} syntaxWhether the prompt is publicly accessible
Version number of the latest prompt version
ISO 8601 timestamp when the prompt was created
ISO 8601 timestamp when the prompt was last updated
Examples
Request
Response
Implementation Details
- The tool fetches the prompt and joins with
prompt_versionsto get the latest version - Variables are extracted using the
extractVariables()utility which matches{{variable}}patterns - The regex supports spaces inside brackets:
{{ variable }}is equivalent to{{variable}} - Access control is enforced at the application level (service-role client bypasses RLS)
- Returns the latest version sorted by
version_numberdescending
Error Codes
The
prompt_id parameter is missing or not a valid UUIDPrompt does not exist, is archived, or caller lacks permission to access it
Database query failed or other internal error occurred