zen-marketing/tools
Ben f0bd374926 Fix critical prompt field error in all marketing tools
## Problem
All 4 marketing tools (contentvariant, subjectlines, platformadapt, factcheck)
were calling prepare_chat_style_prompt() which expects request.prompt field.
This caused "object has no field 'prompt'" errors in Claude Desktop.

## Root Cause
The prepare_prompt() methods were:
1. Building prompt_text string
2. Creating a copy of request
3. Setting request_copy.prompt = prompt_text
4. Calling prepare_chat_style_prompt(request_copy)

But ToolRequest (and subclasses) don't have a 'prompt' field, causing
AttributeError when prepare_chat_style_prompt tries to access it.

## Solution
Changed all prepare_prompt() methods to return the prompt string directly
instead of calling prepare_chat_style_prompt(). This is the correct pattern
for SimpleTool implementations.

## Files Changed
- tools/contentvariant.py: Removed copy() and prepare_chat_style_prompt() call
- tools/subjectlines.py: Removed copy() and prepare_chat_style_prompt() call
- tools/platformadapt.py: Removed copy() and prepare_chat_style_prompt() call
- tools/factcheck.py: Removed copy() and prepare_chat_style_prompt() call

## Testing
- Server startup:  All 7 tools load successfully
- Tool instantiation:  All tools initialize without errors

## Impact
This fixes the schema errors preventing users from using the new Phase 2 tools
in Claude Desktop. All tools should now work correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 14:12:19 -04:00
..
shared Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00
simple Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00
workflow Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00
__init__.py Clean up tools/__init__.py and add git instructions to CLAUDE.md 2025-11-07 12:34:13 -04:00
chat.py Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00
contentvariant.py Fix critical prompt field error in all marketing tools 2025-11-07 14:12:19 -04:00
factcheck.py Fix critical prompt field error in all marketing tools 2025-11-07 14:12:19 -04:00
listmodels.py Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00
models.py Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00
platformadapt.py Fix critical prompt field error in all marketing tools 2025-11-07 14:12:19 -04:00
subjectlines.py Fix critical prompt field error in all marketing tools 2025-11-07 14:12:19 -04:00
version.py Initial commit: Zen-Marketing MCP Server v0.1.0 2025-11-07 11:35:17 -04:00