Writing Prompts

How to write effective prompts for better tools

Prompt Structure

The quality of your generated tool depends largely on how you describe it. A good prompt should be specific, focused, and clear about the desired behavior.

Best Practices

Be Specific

Clearly state what the tool should do. Vague descriptions lead to unpredictable results.

Avoid

"Make a tool"

Too vague, no clear purpose

Better

"QR code generator from URL"

Clear input and output

Keep It Focused

Each tool should do one thing well. Complex multi-step workflows are harder to generate and maintain.

Avoid

"Build a full CRM system"

Too complex for a single tool

Better

"Validate email address format"

Single, well-defined task

Specify Input/Output

If the format matters, mention it in your prompt.

"Convert markdown to HTML"
"Parse CSV and return JSON"
"Generate random password and display as HTML"

Include Constraints

Mention any special requirements or limitations.

"Calculate BMI from height (cm) and weight (kg)"
"Generate secure password with minimum 12 characters"
"Sort array of numbers in ascending order"

Good Examples

Here are proven prompt patterns that generate high-quality tools:

Converters

  • "Convert temperature between Celsius and Fahrenheit"
  • "Convert markdown to HTML"
  • "Convert JSON to YAML"
  • "Encode string to base64"

Generators

  • "Generate QR code from URL"
  • "Generate random UUID"
  • "Create secure password"
  • "Generate Lorem ipsum text"

Validators

  • "Validate email address"
  • "Check if URL is valid"
  • "Validate JSON syntax"
  • "Check password strength"

Calculators

  • "Calculate BMI from height and weight"
  • "Calculate loan payment amount"
  • "Calculate days between two dates"
  • "Calculate percentage change"

Parsers

  • "Parse CSV data"
  • "Extract URLs from text"
  • "Parse date string to ISO format"
  • "Extract email addresses from text"

Common Pitfalls

Too Ambitious

Tools have execution limits (30 seconds, memory constraints). Keep tasks simple.

Missing Context

If your tool needs specific domain knowledge, provide it in the prompt.

Unclear Requirements

Ambiguous prompts lead to tools that may not match your expectations. Be explicit about what you want.

Iterating on Prompts

If a tool doesn't meet your needs:

  1. Review the generated code to understand what it does
  2. Refine your prompt to be more specific
  3. Generate a new tool with the updated prompt
  4. Test and repeat until satisfied