AI ChatCustom Prompts

Custom Prompts

RunReveal provides a custom prompts API that follows the Model Context Protocol (MCP) specification for prompts. This allows you to create reusable prompt templates that can be dynamically customized with arguments.

Overview

Custom prompts enable you to define structured message templates that can be retrieved and customized with specific arguments. This is particularly useful for:

  • Standardizing common analysis requests
  • Creating reusable detection templates
  • Providing consistent prompt structures across your organization
  • Enabling dynamic content injection based on context

Template Syntax

RunReveal uses Handlebars templating syntax for custom prompts. This provides powerful templating capabilities including variable substitution, conditionals, and loops.

Basic Variable Substitution

Arguments are referenced using double curly braces:

{{argument_name}}

Examples:

Basic argument usage:

Please analyze this log data: {{log_data}}

Multiple arguments:

Analyze the following data from {{source}} for the period {{timeframe}}:

{{log_data}}

Focus on {{focus_area}} patterns.

Advanced Handlebars Features

Conditionals

Use {{#if}} blocks to conditionally include content:

Search for {{query}} in logs
{{#if timeframe}}
Time range: {{timeframe}}
{{/if}}
{{#if user}}
Filter by user: {{user}}
{{else}}
Analyzing all users
{{/if}}

Unless Blocks

Use {{#unless}} to show content when a condition is false:

{{#unless error}}
Analysis completed successfully
{{/unless}}

For more advanced Handlebars features, see the Handlebars documentation.

Data Types

Prompt

A prompt definition includes:

  • name: Unique identifier for the prompt
  • title: Optional human-readable name for display purposes
  • description: Optional human-readable description
  • arguments: Optional list of arguments for customization

Example Prompts

Security Analysis Prompt

This example demonstrates using Handlebars conditionals to handle optional parameters:

{
  "name": "security_analysis",
  "title": "Security Analysis",
  "description": "Analyze logs for security threats and anomalies",
  "arguments": [
    {
      "name": "log_data",
      "description": "The log data to analyze",
      "required": true
    },
    {
      "name": "timeframe",
      "description": "Analysis timeframe",
      "required": false
    },
    {
      "name": "focus_areas",
      "description": "Specific areas to focus on",
      "required": false
    }
  ],
  "prompt_text": "You are a security analyst.
    Please analyze the following log data for security threats and anomalies:
 
    {{log_data}}
 
    {{#if timeframe}}
    Timeframe: {{timeframe}}
    {{/if}}
    {{#if focus_areas}}
    Focus areas: {{focus_areas}}
    {{/if}}
 
    Provide a comprehensive analysis including:
    - Identified threats and their severity levels
    - Anomalous patterns or behaviors
    - Potential attack vectors
    - Recommended mitigation strategies
    - Risk assessment and impact analysis"
}

Implementation Considerations

  1. Argument Validation: Servers validate prompt arguments before processing
  2. Authentication: All API requests require a valid API token

## Security

Implementations carefully validate all prompt inputs and outputs to prevent:

- Injection attacks
- Unauthorized access to resources
- Malicious content execution

Always validate and sanitize arguments before using them in prompt templates.

## Usage Examples

### Using Arguments in Prompt Text

```text
Please analyze the following logs for the pattern "{{pattern}}":

{{logs}}

Provide a detailed analysis including:
- Pattern matches found
- Frequency of occurrences
- Potential security implications
- Recommended actions

This documentation follows the Model Context Protocol specification for prompts and provides a comprehensive guide for using RunReveal’s custom prompts API.

Using Prompts in Remote MCP Connection

Claude AI

Follow the steps to set up your remote MCP server connection. Make sure that the Chat read and Chat write permissions are enabled.

Once you have your connection with RunReveal established, start a new chat and open the dropdown menu from the plus icon. If you have any custom prompts configured in your RunReveal workspace, you should see an option “Add from INTEGRATION_NAME” (RunReveal in the example below).

Custom prompts dropdown

Selecting “Add from INTEGRATION_NAME” will either immediately add the prompt as a .txt file to the chat, or prompt you to add values for your configured arguments if the custom prompt has an arguments field.