mcp-server

v2.2.1
@promptx/mcp-server Checked 3 days ago Published 9 months ago

MCP Server implementation for PromptX

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

discover

Discover available AI roles and tools ## What It Does Lists all activatable roles and callable tools, grouped by source: - **📦 System**: Built-in PromptX roles/tools - **🏗️ Project**: Project-specific (requires `project` tool to bind first) - **👤 User**: User-created custom resources - **🎭 RoleX V2**: Lifecycle-managed roles ## When to Use - First time in a project — see what's available - Need a specialist but unsure which role to activate - Looking for the right tool for a task - After creating new roles/tools — discover freshly registered resources ## Tips - In a pro…

ParameterTypeDescription
focusstringFocus scope: 'all' (everything), 'roles' (roles only), or 'tools' (tools only)

action

Role activation & lifecycle management - load role knowledge, memory and capabilities ## Core Features **V1 Roles (DPML)**: Load role config (persona, principles, knowledge), display memory network. **V2 Roles (RoleX)**: Full lifecycle management (born → want → plan → todo → synthesize). On activate, version is auto-detected: V2 takes priority, falls back to V1 if not found. Use `version` parameter to force a specific version: `"v1"` for DPML, `"v2"` for RoleX. ## Cognitive Cycle 1. See task → `recall(role, null)` scan full memory landscape 2. Multi-round `recall` → drill down…

ParameterTypeDescription
role *stringRole ID to activate, e.g.: copywriter, product-manager, java-backend-developer
contentstringContent for train/charter/charge operations
encountersarrayArray of encounter node IDs for reflect operation. Must be existing encounter IDs (usually created by finish operation), or pass empty array [] to create experience directly without consuming encounte…
experiencestringExperience text (Gherkin Feature format) for reflect operation, or reflection text for achieve/abandon operations
experiencesarrayArray of experience node IDs for realize operation. Must be existing experience IDs created by reflect operation. This parameter is REQUIRED for realize.
idstringOptional ID for plan/reflect/realize/master operations. IMPORTANT: plan operation REQUIRES id parameter to set focused_plan_id, otherwise todo will fail.
individualstringIndividual ID for retire/die/rehire/train operations
locatorstringResource locator for skill operation (e.g., npm:@scope/package)
namestringName parameter for born(role name), want(goal name), todo(task name), focus(focus item), synthesize(knowledge name), finish(task name)
nodeIdstringNode ID for forget operation
operationstringOperation type. Default: activate. V2 lifecycle: born, identity, want, plan, todo, finish, achieve, abandon, focus, synthesize. Learning: reflect, realize, master, forget, skill. Organization: found,…
orgstringOrganization name for found/establish/hire/fire/appoint/dismiss
parentstringParent organization name for found (nested orgs)
positionstringPosition name for appoint/charge/require/abolish
principlestringGherkin source for principle in realize operation
procedurestringGherkin source for procedure in master operation
roleResourcesstringResources to load for V1 roles (DPML): all(全部加载), personality(角色性格), principle(角色原则), knowledge(角色知识)
skillstringSkill name for require operation
skillIdstringSkill ID for train/require operations
sourcestringGherkin source text for born/want/todo/synthesize/plan/establish operations
testablebooleanTestable flag for want/todo operations
typestringSynthesize type: knowledge, experience, or voice. For synthesize operation, the role parameter specifies the target role to teach (no need to activate first).
versionstringForce role version: "v1" for DPML, "v2" for RoleX. Auto-detected if omitted.

project

Bind the current IDE project directory ## What It Does Registers the IDE workspace root so PromptX can discover project-level roles and tools. ## When to Use Call this when the IDE has a project open, **before** running `discover`. ## Important - Use the IDE's workspace root path, not a subdirectory - Do not guess or infer the project path from file paths - Without binding: only system-level and user-level resources are available ## Example ``` IDE opens /Users/name/MyProject → bind /Users/name/MyProject (correct) → bind /Users/name/MyProject/src (wrong — don't use subdirectories…

ParameterTypeDescription
ideTypestringIDE or editor type (optional), e.g.: cursor, vscode, claude
workingDirectorystringIDE workspace root directory path. Use the IDE-provided path, do not guess.

recall

Retrieve memories from a role's semantic network ## MANDATORY: Recall at Conversation Start **CRITICAL RULE**: When a role is active, you MUST call recall BEFORE answering the user's first message. This is not optional — skipping recall means losing all accumulated knowledge. ``` Step 1: recall(role, null) → DMN scan, see full memory landscape Step 2: recall(role, "relevant-kw") → drill into topic-specific memories Step 3: Answer using recalled context ``` > Without recall, every conversation starts from zero. With recall, you build on past experience. ## Workflow 1. **DMN…

ParameterTypeDescription
role *stringRole ID to recall memories from, e.g.: java-developer, product-manager
modestringActivation mode: creative (broad association), balanced (default), focused (precise lookup)
queryQuery keywords: string (space-separated) or null (DMN mode — auto-select hub nodes). Keywords must exist in the memory network.

remember

Save knowledge to a role's memory network ## MANDATORY: Remember Before Conversation Ends **CRITICAL RULE**: Before a conversation ends, you MUST call remember to save key insights. Every conversation without remember = knowledge lost forever. **Trigger signals for remember:** - User says "thanks" / "bye" / conversation naturally wrapping up - You just solved a problem or answered a complex question - You learned something new about the user's project/preferences - Recall returned empty — you MUST fill the gap after answering - Every 5-7 rounds of deep discussion — save intermediate ins…

ParameterTypeDescription
engrams *arrayArray of engram objects for batch memory storage. Each contains content, schema, strength, type
role *stringRole ID to save memories for, e.g.: java-developer, product-manager

toolx

ToolX runtime — load and execute PromptX ecosystem tools ## What It Does Universal interface for calling PromptX tools (file ops, PDF reading, role creation, etc.). Input is a YAML document specifying the tool, mode, and parameters. ## Modes | Mode | Purpose | |---|---| | manual | Read tool documentation (**always do this first**) | | execute | Run the tool with parameters | | configure | Set environment variables for a tool | | log | View tool execution logs | | dryrun | Preview without executing | ## Examples **Read tool manual (do this first):** ```yaml tool: tool://filesystem mode:…

ParameterTypeDescription
yaml *stringYAML-formatted tool invocation config