apply_adapt_framework
Refine any base prompt with the ADAPT framework by specifying audience, document type, accuracy, purpose, and tone, ensuring precise output.
Instructions
[PRO] Apply the ADAPT framework to any base prompt for precision output. ADAPT: Audience, Document type, Accuracy level, Purpose, Tone. Add any combination of layers to sharpen any prompt in this library or your own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_prompt | Yes | ||
| audience | No | ||
| document_type | No | ||
| accuracy_level | No | ||
| purpose | No | ||
| tone | No | ||
| additional_modifiers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:913-960 (handler)The main handler function for the 'apply_adapt_framework' tool. It takes base_prompt and up to 6 optional ADAPT modifier parameters (audience, document_type, accuracy_level, purpose, tone, additional_modifiers), builds an ADAPT layers string, and returns the enhanced prompt with power modifier suggestions.
@mcp.tool() def apply_adapt_framework( base_prompt: str, audience: str = "", document_type: str = "", accuracy_level: str = "", purpose: str = "", tone: str = "", additional_modifiers: str = "" ) -> str: """ [PRO] Apply the ADAPT framework to any base prompt for precision output. ADAPT: Audience, Document type, Accuracy level, Purpose, Tone. Add any combination of layers to sharpen any prompt in this library or your own. """ layers = [] if audience: layers.append(f"Write for {audience}.") if document_type: layers.append(f"Format as a {document_type}.") if accuracy_level: layers.append(f"Use {accuracy_level} accuracy/terminology level.") if purpose: layers.append(f"The purpose is to {purpose}.") if tone: layers.append(f"Tone: {tone}.") if additional_modifiers: layers.append(additional_modifiers) adapt_layers = "\n".join(layers) if layers else "No additional modifiers applied." return f"""ADAPT-ENHANCED PROMPT: {base_prompt} ─── ADAPT MODIFIERS ─── {adapt_layers} ─── POWER MODIFIERS AVAILABLE ─── Add any of these to further refine output: - "Limit your response to [X] words." - "Write at a [medical professional / 8th grade] reading level." - "Provide 3 alternative versions with different tones." - "Build on the previous response to add a [SECTION]." - "Revise your previous response to be 20% shorter without losing key data." - "For each edit you make, briefly explain why." - "Write in the style of papers published in [NEJM / JAMA / Blood]." - "If you are uncertain about any fact, mark it with [VERIFY]." """ - server.py:913-914 (registration)The tool is registered via the @mcp.tool() decorator on line 913, which makes the function an MCP tool callable by AI agents.
@mcp.tool() def apply_adapt_framework( - server.py:914-922 (schema)The function signature defines the input schema: base_prompt (required str) and six optional string parameters (audience, document_type, accuracy_level, purpose, tone, additional_modifiers). The return type is str.
def apply_adapt_framework( base_prompt: str, audience: str = "", document_type: str = "", accuracy_level: str = "", purpose: str = "", tone: str = "", additional_modifiers: str = "" ) -> str: