Documentation

MCP Reference

Promptmark’s MCP server exposes 74 tools across 12 categories. All tools require authentication via Bearer JWT or API key.

Prompt Tools (13)

list_prompts Prompts

List prompts with optional filtering.

Parameters:

Name Type Required Description
search string No Filter by title or content
tag string No Filter by tag name
collection_id string No Filter by collection ID
type_id string No Filter by prompt type
is_template boolean No Filter templates only (true) or prompts only (false)
is_remix boolean No Filter remixes only (true) or exclude (false)
limit integer No Max results (default 50, max 100)
offset integer No Pagination offset (default 0)
get_prompt Prompts

Get a specific prompt by ID.

Parameters:

Name Type Required Description
id string Yes The prompt ID
create_prompt Prompts

Create a new prompt.

Parameters:

Name Type Required Description
title string Yes Prompt title
prompt string Yes Prompt content (use {{var}} for templates)
notes string No Private notes
is_public boolean No Public visibility (default false)
is_remixable boolean No Allow remixing (default false)
tags string No JSON array of tags, e.g. ["ai", "coding"]
type_id string No Type: general, system, query, text-to-image, text-to-video, text-to-speech, text-to-code, agent
collection_id string No Collection to assign to
remixed_id string No Source prompt ID (creates a remix)
models string No JSON array of model IDs
self_rating number No Rating 1-5 (0 = no rating)
update_prompt Prompts

Update an existing prompt. Only provided fields are changed.

Parameters:

Name Type Required Description
id string Yes Prompt ID to update
title string No New title
prompt string No New content
notes string No New notes
is_public boolean No Public visibility
is_remixable boolean No Allow remixing
tags string No JSON array of tags
type_id string No Prompt type
collection_id string No Collection ID (empty string to remove)
models string No JSON array of model IDs
self_rating number No Rating 1-5
delete_prompt Prompts

Soft-delete a prompt.

Parameters:

Name Type Required Description
id string Yes Prompt ID to delete
search_prompts Prompts

Search prompts by title, tags, or visibility.

Parameters:

Name Type Required Description
query string No Search term for title and notes
tags array No Filter by tags (must match ALL)
is_public boolean No Filter by visibility
limit integer No Max results (default 50)
list_tags Prompts

List all unique tags across your prompts.

Parameters:

Name Type Required Description
include_counts boolean No Include usage count per tag (default false)
limit integer No Max tags to return (default 100)
get_prompt_schema Prompts

Get the template variable schema for a prompt.

Parameters:

Name Type Required Description
id string Yes Prompt ID

Returns: Variable names, types, defaults, options, and required status.

render_prompt Prompts

Render a prompt template by substituting variables.

Parameters:

Name Type Required Description
id string Yes Prompt template ID
variables object No Key-value pairs of variable values

Returns: The rendered prompt text with variables substituted.

validate_prompt_inputs Prompts

Validate variable values before rendering.

Parameters:

Name Type Required Description
id string Yes Prompt template ID
variables object Yes Key-value pairs to validate

Returns: Validation errors for invalid or missing required values.

get_prompt_tools Prompts

Get the attached MCP and native tools for a prompt.

Parameters:

Name Type Required Description
prompt_id string Yes The prompt ID

Returns: Tool references with connection IDs, tool names, and native provider info. Includes count of attached tools.

update_prompt_tools Prompts

Set the full list of attached tools on a prompt. Replaces any existing tools. Each tool reference needs either connection_id + tool_name (for MCP server tools) or native_provider + tool_name + native_type (for native tools like Anthropic web search).

Parameters:

Name Type Required Description
prompt_id string Yes The prompt ID
tool_refs array Yes Array of tool reference objects (max 50)

Each object in tool_refs has:

Name Type Required Description
connection_id string No MCP connection ID (for MCP server tools)
tool_name string Yes Name of the tool
native_provider string No Provider name for native tools (e.g. anthropic, openai)
native_type string No API type identifier for native tools (e.g. web_search_20250305)
remove_prompt_tool Prompts

Remove a single tool from a prompt’s attached tools. For MCP tools, provide connection_id and tool_name. For native tools, provide native_provider and tool_name.

Parameters:

Name Type Required Description
prompt_id string Yes The prompt ID
connection_id string No MCP connection ID (for MCP server tools)
tool_name string Yes Name of the tool to remove
native_provider string No Provider name for native tools (e.g. anthropic)

Collection Tools (6)

list_collections Collections

List all collections.

Parameters:

Name Type Required Description
include_counts boolean No Include prompt count per collection (default true)
get_collection Collections

Get a specific collection with optional prompt list.

Parameters:

Name Type Required Description
id string Yes Collection ID
include_prompts boolean No Include prompt IDs (default false)
create_collection Collections

Create a new collection.

Parameters:

Name Type Required Description
name string Yes Collection name
description string No Description
icon string No Icon identifier (default “folder”)
color string No Color: gray, red, orange, yellow, green, cyan, blue, purple, pink (default “gray”)
is_public boolean No Public visibility (default false)
update_collection Collections

Update a collection. Only provided fields are changed.

Parameters:

Name Type Required Description
id string Yes Collection ID
name string No New name
description string No New description
icon string No New icon
color string No New color
is_public boolean No Public visibility
delete_collection Collections

Delete a collection. Prompts in it become uncategorized.

Parameters:

Name Type Required Description
id string Yes Collection ID
assign_prompt_to_collection Collections

Move a prompt to a collection or remove from its current collection.

Parameters:

Name Type Required Description
prompt_id string Yes Prompt ID
collection_id string No Target collection ID (empty to remove)

Tag Tools (4)

rename_tag Tags

Rename a tag across all prompts that use it.

Parameters:

Name Type Required Description
old_name string Yes Current tag name
new_name string Yes New tag name
add_tag Tags

Add a tag to a specific prompt. Tags must be alphanumeric with hyphens and underscores, max 50 characters. Duplicate tags (case-insensitive) are ignored.

Parameters:

Name Type Required Description
prompt_id string Yes The prompt ID to add the tag to
tag string Yes Tag name (alphanumeric, hyphens, underscores, max 50 chars)

Returns: Updated tag list and count for the prompt.

remove_tag Tags

Remove a tag from a specific prompt. Uses exact string matching.

Parameters:

Name Type Required Description
prompt_id string Yes The prompt ID to remove the tag from
tag string Yes Exact tag name to remove

Returns: Updated tag list and count for the prompt.

bulk_add_tag Tags

Add a tag to multiple prompts at once. Skips prompts that already have the tag. Uses a database transaction for atomicity.

Parameters:

Name Type Required Description
tag string Yes Tag name to add (alphanumeric, hyphens, underscores, max 50 chars)
prompt_ids array Yes Array of prompt IDs to add the tag to (max 100)

Returns: Number of prompts updated and total prompts requested.


Remix Tools (1)

list_remixes Remix

List all remixes (prompts derived from other prompts).

Parameters:

Name Type Required Description
limit integer No Max results (default 50)

Version Tools (3)

get_prompt_versions Versions

Get version history for a prompt.

Parameters:

Name Type Required Description
prompt_id string Yes Prompt ID
get_prompt_version Versions

Get a specific version snapshot.

Parameters:

Name Type Required Description
version_id string Yes Version ID
restore_prompt_version Versions

Restore a prompt to a previous version. Snapshots the current state first.

Parameters:

Name Type Required Description
prompt_id string Yes Prompt ID
version_id string Yes Version ID to restore

Response Tools (4)

capture_response Responses

Capture an AI response for a prompt.

Parameters:

Name Type Required Description
prompt_id string Yes Prompt ID
model_id string Yes Model name/ID (e.g., openai/gpt-4o, anthropic/claude-sonnet-4)
content string Yes Response content
metadata object No Optional metadata (tokens, latency, temperature)
list_captured_responses Responses

List captured responses, newest first.

Parameters:

Name Type Required Description
prompt_id string No Filter by prompt ID
limit integer No Max results (default 20, max 100)
offset integer No Pagination offset
get_captured_response Responses

Get full response content by ID.

Parameters:

Name Type Required Description
id string Yes Response ID
delete_captured_response Responses

Permanently delete a captured response.

Parameters:

Name Type Required Description
id string Yes Response ID

Scan Tools (1)

acknowledge_scan Scans

Acknowledge a safety scan issue. Transitions the flag from HAS (1) to HAD (2), allowing the prompt to be published.

Parameters:

Name Type Required Description
prompt_id string Yes Prompt ID
category string Yes Scan category: pii, injection, secrets, or danger

Conversation Tools (11)

list_conversations Conversations

List conversations with optional search and source filtering.

Parameters:

Name Type Required Description
page integer No Page number (1-indexed, default 1)
search string No Search conversations by title
source string No Filter by source: native, claude, chatgpt, json, markdown
get_conversation Conversations

Get a conversation by ID with optional messages.

Parameters:

Name Type Required Description
id string Yes The conversation ID to retrieve
include_messages boolean No Include messages in response (default true)
message_limit integer No Max messages to return (default 50, max 200)
create_conversation Conversations

Create a new conversation with a model and optional system prompt.

Parameters:

Name Type Required Description
title string Yes Conversation title
model_id string Yes AI model ID for this conversation (e.g. anthropic/claude-sonnet-4)
linked_prompt_id string No Link to an existing prompt ID for system prompt
system_prompt string No Custom system prompt (overrides linked prompt)
update_conversation Conversations

Update conversation metadata (title, model, linked prompt, system prompt). Only provided fields are changed.

Parameters:

Name Type Required Description
id string Yes The conversation ID to update
title string No New conversation title (max 200 chars)
model_id string No New model ID
linked_prompt_id string No Prompt ID to link (empty string to unlink)
system_prompt string No New system prompt text
delete_conversation Conversations

Delete a conversation (soft delete).

Parameters:

Name Type Required Description
id string Yes The conversation ID to delete
send_message Conversations

Send a message in a conversation and get the AI response (non-streaming). Requires an API key configured in Settings (supports OpenRouter, OpenAI, and Anthropic).

Parameters:

Name Type Required Description
conversation_id string Yes The conversation ID to send a message in
content string Yes Message content to send
prompt_reference_id string No Optional reference to a prompt ID
import_conversation Conversations

Import a conversation with messages from an external source.

Parameters:

Name Type Required Description
title string Yes Conversation title
source string No Import source identifier (e.g. claude, chatgpt)
model string No Model ID used in the conversation
messages array Yes Array of message objects (see below)

Each object in messages has:

Name Type Required Description
role string Yes Message role: system, user, or assistant
content string Yes Message content
list_conversation_messages Conversations

List messages in a conversation with cursor-based pagination for large threads.

Parameters:

Name Type Required Description
conversation_id string Yes The conversation ID
before string No Cursor: return messages created before this ISO 8601 timestamp
limit integer No Max messages to return (default 50, max 200)
link_conversation_prompt Conversations

Link a conversation to an existing prompt for system prompt injection.

Parameters:

Name Type Required Description
conversation_id string Yes The conversation ID
prompt_id string Yes The prompt ID to link
update_conversation_tools Conversations

Replace the full set of attached tools for a conversation. Validates each tool reference against active connections and cached tools.

Parameters:

Name Type Required Description
conversation_id string Yes The conversation ID
tools array Yes Full list of tools to attach (replaces current set, max 50)

Each object in tools has:

Name Type Required Description
connection_id string No MCP connection ID (for MCP tools)
tool_name string Yes Tool name
is_native boolean No True for provider built-in tools (e.g. Anthropic web search)
native_provider string No Provider name for native tools: anthropic, openai
native_type string No API type identifier for native tools (e.g. web_search_20250305)
remove_conversation_tool Conversations

Remove a single tool from a conversation’s attached tools.

Parameters:

Name Type Required Description
conversation_id string Yes The conversation ID
connection_id string Yes MCP connection ID, or native for provider built-in tools
tool_name string Yes Name of the tool to remove

Playbook Tools (13)

Playbooks are multi-step AI workflows with sequential execution, branching, breakpoints, and elicitation. Content uses markdown with ## STEP, ## BRANCH, ## INPUTS, and ## ARTIFACTS sections. Variables use {{var}} syntax. Steps can capture named outputs with @output(varname) directives and request user input mid-execution with @elicit(type, "prompt").

list_playbooks Playbooks

List playbooks with optional search, tag filtering, and pagination.

Parameters:

Name Type Required Description
search string No Search playbooks by title
tags string No JSON array of tags to filter by
page integer No Page number (1-indexed, default 1)
page_size integer No Results per page (default 20, max 100)
get_playbook Playbooks

Get a playbook by ID with its parsed structure (steps, inputs, branches).

Parameters:

Name Type Required Description
id string Yes The playbook ID to retrieve

Returns: Playbook metadata, raw content, and parsed definition including steps, input variables, branches, artifact type, and output variables.

create_playbook Playbooks

Create a new multi-step playbook with markdown content containing ## STEP sections.

Parameters:

Name Type Required Description
title string Yes The playbook title
content string Yes The playbook markdown content with ## STEP sections
description string No Optional description of the playbook
tags string No JSON array of tag strings
default_model_id string No Default AI model ID for execution
artifact_type string No Artifact type for final output: markdown, json, mermaid, chartjs, html_css, javascript, typescript. Parsed from ## ARTIFACTS section if present in content.
output_vars array No Informational list of named output variables defined via @output() directives in the playbook steps
update_playbook Playbooks

Update an existing playbook. Snapshots the current version before applying changes. Only provided fields are changed.

Parameters:

Name Type Required Description
id string Yes The playbook ID to update
title string No New title
content string No New playbook markdown content
description string No New description
tags string No New JSON array of tag strings
default_model_id string No New default AI model ID
artifact_type string No New artifact type: markdown, json, mermaid, chartjs, html_css, javascript, typescript
output_vars array No Informational list of named output variables (read-only, derived from @output() directives in content)
delete_playbook Playbooks

Soft-delete a playbook.

Parameters:

Name Type Required Description
id string Yes The playbook ID to delete
validate_playbook Playbooks

Validate playbook markdown content without saving. Returns the parsed structure with any warnings or errors.

Parameters:

Name Type Required Description
content string Yes The playbook markdown content to validate

Returns: Parsed playbook structure (steps, inputs, branches, artifacts, outputs) or validation errors describing syntax issues.

execute_playbook Playbooks

Execute a playbook with given input values and AI model. Runs each step sequentially with accumulated context. Supports breakpoints to pause execution at specific steps. Returns named output variables from @output() directives and artifact_type from ## ARTIFACTS section. Requires an API key configured in Settings.

Parameters:

Name Type Required Description
playbook_id string Yes The playbook ID to execute
input_values object No Key-value pairs of input variable values
model_id string No AI model ID to use (overrides playbook default)
breakpoints string No Comma-separated step numbers where execution should pause (e.g. "2,4"). Paused executions can be resumed with resume_playbook_execution.

Returns: Execution ID, status (completed, failed, paused, awaiting_input), step results with content and metadata, named outputs, and cost/token totals.

get_playbook_execution Playbooks

Get a playbook execution by ID with all step results.

Parameters:

Name Type Required Description
execution_id string Yes The execution ID to retrieve

Returns: Execution metadata, status, per-step results (content, tokens, cost, latency, model), named outputs, and artifact information.

list_playbook_executions Playbooks

List executions for a playbook with pagination.

Parameters:

Name Type Required Description
playbook_id string Yes The playbook ID to list executions for
page integer No Page number (1-indexed, default 1)
page_size integer No Results per page (default 20, max 50)
get_playbook_versions Playbooks

Get version history for a playbook.

Parameters:

Name Type Required Description
playbook_id string Yes The playbook ID to get version history for

Returns: List of version snapshots with ID, timestamp, and content summary.

restore_playbook_version Playbooks

Restore a playbook to a previous version. Snapshots the current state first.

Parameters:

Name Type Required Description
playbook_id string Yes The playbook ID to restore
version_id string Yes The version ID to restore to
resume_playbook_execution Playbooks

Resume a paused playbook execution from the next step after a breakpoint. Optionally override input variables before continuing. The execution must be in paused status from a previous execute_playbook or resume_playbook_execution call.

Parameters:

Name Type Required Description
execution_id string Yes The paused execution ID to resume
variables object No Optional variable overrides to apply before resuming
respond_to_elicitation Playbooks

Respond to an elicitation prompt in a paused playbook execution. When a step contains an @elicit() directive, execution pauses with status awaiting_input. Provide the response to resume execution from the elicitation step.

Parameters:

Name Type Required Description
execution_id string Yes The execution ID awaiting elicitation response
response string Yes The user’s response to the elicitation prompt

Skills Tools (6)

User-authored agent skills follow the agentskills.io spec — a single SKILL.md file with YAML frontmatter (name, description, license, compatibility, allowed_tools) and a markdown body. The MCP tools below let an external client manage the skill library (CRUD + search).

Info
Heads up — load_skill is not an MCP tool. Inside a Promptmark conversation, non-draft skills are injected into the system prompt as a sanitized catalog, and the model retrieves full SKILL.md content on demand via a server-injected load_skill tool. That tool only exists inside Promptmark’s own conversation surface — it will not appear in your MCP client’s tool list. See Skills for the in-conversation flow.
list_skills Skills

List skills with optional substring search and pagination.

Parameters:

Name Type Required Description
search string No Search by name, title, or description
page integer No Page number (1-indexed, default 1)
page_size integer No Results per page (default 20, max 100)
get_skill Skills

Get the full SKILL.md for a skill (frontmatter + body). Provide either id or name.

Parameters:

Name Type Required Description
id string No Skill ID (UUID)
name string No Skill name (max 200 chars)

Returns: The full SKILL.md as a string: ---\n<frontmatter YAML>\n---\n\n<markdown body>.

create_skill Skills

Create a new skill from SKILL.md content. The content is parsed and validated against the agentskills.io spec; safety scans (PII, injection, secrets) run before persistence.

Parameters:

Name Type Required Description
content string Yes Full SKILL.md content (YAML frontmatter + markdown body)
title string No Optional human-readable display title
icon_emoji string No Optional icon emoji (default: sparkle)
tags array No List of tag strings (max 50)
is_draft boolean No Whether the skill is a draft (default false)
update_skill Skills

Update an existing skill. Snapshots the current state to the version history before applying changes. Frontmatter name and description come from the new content; title, icon_emoji, tags, and is_draft are independent fields.

Parameters:

Name Type Required Description
id string Yes Skill ID (UUID)
content string Yes New SKILL.md content
title string No New display title
icon_emoji string No New icon emoji
tags array No New tag list (max 50)
is_draft boolean No Draft state (omit to leave unchanged)
delete_skill Skills

Soft-delete a skill by ID.

Parameters:

Name Type Required Description
id string Yes Skill ID (UUID)
search_skills Skills

Search skills by name, title, or description substring. Thin wrapper over list_skills that requires a query.

Parameters:

Name Type Required Description
query string Yes Search query (max 200 chars)
page integer No Page number (1-indexed, default 1)
page_size integer No Results per page (default 20, max 100)

MCP Connection Tools (10)

Manage external MCP server connections. Connect to any MCP-compatible server (e.g. Civic Hub, custom servers) and browse their tools from within Promptmark.

list_mcp_connections MCP Connections

List configured external MCP server connections with pagination.

Parameters:

Name Type Required Description
active_only boolean No Only return active connections
limit integer No Max results (default 20, max 100)
offset integer No Pagination offset
get_mcp_connection MCP Connections

Get details of a specific MCP server connection including its available tools.

Parameters:

Name Type Required Description
id string Yes Connection ID
create_mcp_connection MCP Connections

Add a new external MCP server connection.

Parameters:

Name Type Required Description
name string Yes Display name for the connection
server_url string Yes MCP server URL (e.g. https://app.civic.com/hub/mcp)
description string No Optional description
auth_type string No Authentication type: none, bearer, api_key, oauth, custom_headers (default none)
auth_credentials string No Authentication credentials (token or API key)
update_mcp_connection MCP Connections

Update settings for an existing MCP server connection. Only provided fields are updated.

Parameters:

Name Type Required Description
id string Yes Connection ID to update
name string No Display name
description string No Description
auth_type string No Authentication type
auth_credentials string No Authentication credentials
is_active boolean No Whether connection is active
delete_mcp_connection MCP Connections

Remove an MCP server connection and its cached tools.

Parameters:

Name Type Required Description
id string Yes Connection ID to delete
refresh_mcp_tools MCP Connections

Refresh the cached tool list for an MCP connection by reconnecting to the remote server and re-fetching available tools.

Parameters:

Name Type Required Description
connection_id string Yes ID of the MCP connection to refresh tools for
list_mcp_tools MCP Connections

List cached tools for an MCP connection. Uses locally cached data — no live connection needed.

Parameters:

Name Type Required Description
connection_id string Yes ID of the MCP connection to browse tools for
get_mcp_tool MCP Connections

Get details of a specific tool on an MCP connection including its full input schema.

Parameters:

Name Type Required Description
connection_id string Yes ID of the MCP connection
tool_name string Yes Name of the tool to get details for
list_mcp_executions MCP Connections

List tool execution history with optional filtering by connection. Returns executions ordered by creation date (newest first).

Parameters:

Name Type Required Description
connection_id string No Filter by connection ID (omit for all connections)
limit integer No Max results (default 20, max 100)
offset integer No Pagination offset
favorite_mcp_tool MCP Connections

Set or clear the favorite flag on a cached MCP tool. Favorited tools appear prominently in the tool picker.

Parameters:

Name Type Required Description
connection_id string Yes ID of the MCP connection that owns the tool
tool_name string Yes Name of the tool to favorite or unfavorite
is_favorite boolean Yes true to favorite, false to unfavorite

PostHog Tools (2)

Configure bring-your-own-key PostHog analytics for AI generation event tracking. Project and personal keys are encrypted with AES-GCM before storage; decrypted keys are never returned by these tools or surfaced in the UI.

configure_posthog PostHog

Configure PostHog analytics with your own project and personal API keys. Validates key prefixes, validates the host URL (HTTPS scheme required, internal/private addresses blocked for SSRF), encrypts the keys, and saves the configuration.

Parameters:

Name Type Required Description
project_api_key string Yes PostHog project API key (must start with phc_)
personal_api_key string No PostHog personal API key for feature flags (must start with phx_)
host string No PostHog instance URL (default https://us.i.posthog.com). Use https://eu.i.posthog.com for EU Cloud or your own URL for self-hosted.
enabled boolean No Enable or disable analytics (default true)

Returns: Confirmation message with host, enabled, has_project_key, and has_personal_key flags. Decrypted keys are never returned.

get_posthog_status PostHog

Get the current PostHog analytics configuration status. Never returns decrypted keys.

Parameters: None.

Returns: Object with configured, enabled, has_personal_key, and host fields. If no configuration exists, configured and enabled are false and host defaults to https://us.i.posthog.com.