Skip to content

Prompt MCP Tools ​

Nexus exposes prompt management through MCP tools, allowing AI agents to work with prompts programmatically.

Available Tools ​

list-prompts ​

List all available prompts with optional filtering.

Parameters:

ParameterTypeDescription
activeOnlybooleanOnly return active prompts
installedOnlybooleanOnly return installed prompts
starterOnlybooleanOnly return starter pack prompts

Example:

json
{
  "name": "list-prompts",
  "arguments": {
    "activeOnly": false,
    "installedOnly": true
  }
}

get-prompt ​

Get detailed information about a specific prompt.

Parameters:

ParameterTypeRequiredDescription
promptIdstringYesPrompt ID or slug
resolvebooleanNoResolve inheritance chain

Example:

json
{
  "name": "get-prompt",
  "arguments": {
    "promptId": "react-typescript-expert",
    "resolve": true
  }
}

get-active-prompts ​

Get all currently active prompts for the user, ordered by priority.

Parameters: None

Returns: Array of active prompts with their configurations merged.

activate-prompt ​

Activate a prompt for the current user.

Parameters:

ParameterTypeRequiredDescription
promptIdstringYesPrompt ID or slug
prioritynumberNoPriority order (lower = higher priority)

Example:

json
{
  "name": "activate-prompt",
  "arguments": {
    "promptId": "testing-qa-engineer",
    "priority": 2
  }
}

deactivate-prompt ​

Deactivate a specific prompt or all prompts.

Parameters:

ParameterTypeRequiredDescription
promptIdstringNo*Prompt ID or slug to deactivate
allbooleanNo*Deactivate all prompts

*One of promptId or all is required.

Example:

json
{
  "name": "deactivate-prompt",
  "arguments": {
    "promptId": "react-typescript-expert"
  }
}

download-prompt ​

Download a prompt as markdown content.

Parameters:

ParameterTypeRequiredDescription
promptIdstringYesPrompt ID or slug
resolvebooleanNoInclude resolved parent content

Returns: Markdown content of the prompt suitable for FLOW.md files.

suggest-prompts ​

Get AI-powered prompt suggestions based on project context.

Parameters:

ParameterTypeRequiredDescription
projectPathstringNoPath to analyze
dependenciesstring[]NoPackage dependencies
filesstring[]NoFile patterns in project
descriptionstringNoProject description

Example:

json
{
  "name": "suggest-prompts",
  "arguments": {
    "dependencies": ["react", "typescript", "vitest"],
    "description": "React app with testing"
  }
}

Returns: Array of recommended prompts with confidence scores.

create-prompt ​

Create a new custom prompt.

Parameters:

ParameterTypeRequiredDescription
namestringYesPrompt name
slugstringYesURL-friendly slug
descriptionstringNoPrompt description
systemPromptstringYesSystem prompt content
parentPromptIdstringNoParent prompt to extend
librariesstring[]NoLibrary IDs to include
skillsstring[]NoSkill IDs to include
preferencesobjectNoResponse preferences

Example:

json
{
  "name": "create-prompt",
  "arguments": {
    "name": "My Custom Prompt",
    "slug": "my-custom-prompt",
    "systemPrompt": "You are a helpful assistant...",
    "libraries": ["react", "typescript"],
    "preferences": {
      "verbosity": "concise",
      "codeStyle": "documented"
    }
  }
}

Usage Patterns ​

Initial Context Loading ​

At the start of a session, check for active prompts:

1. Call get-active-prompts to see current configuration
2. If no prompts active, call suggest-prompts with project context
3. Offer to activate recommended prompts

Project-Aware Activation ​

When entering a new project directory:

1. Check for .nexus/config.json with defaultPrompt
2. If found, call activate-prompt with the default
3. Otherwise, call suggest-prompts for recommendations

Memory Association ​

When saving memories while prompts are active:

1. Call get-active-prompts to get current prompt IDs
2. Include promptId in save-memory call
3. Memories are automatically associated

Error Handling ​

All tools return standardized errors:

ErrorCodeDescription
PromptNotFound404Prompt ID or slug doesn't exist
NotAuthenticated401API key required
PromptAlreadyActive409Prompt is already activated
MaxDepthExceeded400Inheritance chain too deep
PermissionDenied403Cannot modify this prompt

Released under the MIT License.