Skip to main content

MCP Prompts Reference

Prompts in MCP are pre-built, parameterized templates that help AI assistants generate consistent, context-aware responses. SolarSens MCP provides prompt templates for common reporting tasks.

What are MCP Prompts?

MCP Prompts are reusable templates that:

  • Guide the AI to produce consistent output formats
  • Reduce prompt engineering burden on users
  • Ensure proper context and structure for specific tasks
  • Can be invoked by name with parameters

Prompts vs Tools:

  • Prompts: Template-based guidance for AI responses (e.g., "generate a daily report format")
  • Tools: Execute actions and fetch data (e.g., "fetch plant data for yesterday")

Typically, prompts work alongside tools - tools fetch the data, prompts structure how to present it.


Available Prompts

get_daily_report_prompt

Generates a structured daily report template for a specific date.

Description

This prompt template helps the AI assistant generate consistent daily performance reports across your solar plant portfolio. It provides the structure and context needed to create comprehensive daily summaries.

Parameters

ParameterTypeRequiredDescription
datestringYesDate for the report in YYYY-MM-DD format

Usage

Invocation:

Use the get_daily_report_prompt for 2024-10-01

What the AI receives:

Generate a summary report for the date: 2024-10-01

Example Workflow

1. User asks:

"Generate a daily report for yesterday"

2. AI workflow:

1. Invoke get_daily_report_prompt with date="2024-10-01"
2. Call fetch_operation_overview tool with date="2024-10-01"
3. Use prompt template to structure the data into a report
4. Present formatted daily report to user

3. AI generates:

Daily Solar Performance Report - October 1, 2024

Portfolio Overview:
- Total Energy Generated: 125,450 kWh
- Average Performance Ratio: 84.2%
- Fleet Availability: 97.5%

Plant Performance Summary:
1. Ho_Chi_Minh_City_1
- Energy: 42,100 kWh
- PR: 87.2%
- Availability: 99.1%
- Status: ✅ Normal

2. Bangkok_Solar_2
- Energy: 51,200 kWh
- PR: 85.8%
- Availability: 98.5%
- Status: ✅ Normal

3. Singapore_Plant_3
- Energy: 32,150 kWh
- PR: 78.9%
- Availability: 94.2%
- Status: ⚠️ Below target

Action Items:
- Investigate Singapore_Plant_3 availability issues
- Review performance trends for plants below 80% PR

Generated: 2024-10-02 08:00:00 UTC

Using Prompts Effectively

Combining Prompts with Tools

Prompts work best when combined with tools. Here's the typical flow:

Example:

User: "Give me a daily report for all plants"

AI Process:
1. Invoke: get_daily_report_prompt(date="2024-10-01")
2. Call: fetch_operation_overview(date_str="2024-10-01")
3. Format data using prompt template
4. Return: Structured daily report

Custom Report Variations

While the base prompt provides structure, you can customize the output by adding specific requests:

Basic:

"Generate a daily report for yesterday"

With focus area:

"Generate a daily report for yesterday, focusing on plants with availability below 95%"

With comparisons:

"Generate a daily report for yesterday and compare it to the same day last week"

Prompt Template Structure

The get_daily_report_prompt template guides the AI to include:

  1. Report Header

    • Date
    • Report type
  2. Portfolio Summary

    • Total energy generated
    • Average performance ratio
    • Fleet availability
    • Number of active plants
  3. Plant-by-Plant Breakdown

    • Individual plant metrics
    • Status indicators
    • Anomaly highlights
  4. Insights & Trends

    • Notable performance changes
    • Underperforming plants
    • Top performers
  5. Action Items

    • Issues requiring attention
    • Recommended follow-ups
  6. Metadata

    • Report generation timestamp
    • Data source information

Advanced Usage

Scheduled Reports

Prompts can be used for automated reporting workflows:

Morning briefing:

"Use get_daily_report_prompt to generate yesterday's performance summary"

Weekly summary:

"Generate daily reports for each day this week and create a weekly summary"

Monthly overview:

"Create a report for the last 30 days showing performance trends"

Combining Multiple Prompts

You can chain prompts with different data sources:

1. Get daily plant report
2. Add inverter-level details for underperforming plants
3. Include historical context from last 7 days
4. Generate comprehensive troubleshooting report

Customizing Prompt Output

While you can't modify the core prompt template, you can guide the AI to adjust the output:

Format preferences:

"Generate a daily report in table format"
"Generate a daily report as a bullet list"
"Generate a daily report with charts/graphs descriptions"

Content focus:

"Generate a daily report highlighting only plants below 80% PR"
"Generate a daily report focusing on availability issues"
"Generate a daily report emphasizing energy production trends"

Audience-specific:

"Generate a daily report for executive summary (high-level only)"
"Generate a daily report for operations team (detailed metrics)"
"Generate a daily report for maintenance team (focus on issues)"

Technical Details

Prompt Implementation

Prompts are defined in the codebase using the @mcp.prompt decorator:

@mcp.prompt
def get_daily_report_prompt(date: str) -> str:
"""Prompt to get daily report for a specific date."""
return f"Generate a summary report for the date: {date}"

Prompt Discovery

AI assistants automatically discover available prompts through the MCP protocol:

  • Prompts are registered when the MCP server starts
  • AI can list all available prompts
  • AI can inspect prompt parameters and descriptions
  • AI invokes prompts by name with required parameters

Best Practices

  1. Use prompts for consistency

    • Invoke the same prompt template for regular reports
    • Maintain consistent format across time periods
  2. Combine with tools

    • Always pair prompts with relevant data-fetching tools
    • Let tools handle data access, prompts handle formatting
  3. Provide context

    • Use specific dates rather than relative terms
    • Include relevant filters or focus areas
  4. Iterate on outputs

    • Request adjustments if initial output isn't perfect
    • The AI can refine based on your feedback

Future Prompts (Roadmap)

Additional prompt templates under consideration:

  • Weekly summary prompt: Structured weekly performance overview
  • Monthly report prompt: Comprehensive monthly analysis template
  • Anomaly investigation prompt: Template for troubleshooting issues
  • Comparative analysis prompt: Side-by-side plant comparison format
  • Executive dashboard prompt: High-level KPI summary
  • Inverter health report prompt: Inverter-specific analysis template

Troubleshooting

Prompt not producing expected output

Issue: Report format doesn't match expectations

Solutions:

  • Provide more specific instructions alongside the prompt
  • Request format adjustments explicitly
  • Combine with specific tool calls for better context

Missing data in reports

Issue: Report shows empty or incomplete data

Causes:

  • Date might not have data available
  • User might not have access to certain plants
  • Network/S3 issues preventing data fetch

Solutions:

  • Verify data exists for the specified date
  • Check user authorization with list_plants tool
  • Use recent dates (yesterday or earlier)

Inconsistent report formats

Issue: Reports vary in structure

Cause: Prompt provides general guidance, AI may interpret differently

Solution:

  • Use more specific formatting instructions
  • Provide example of desired output format
  • Request consistent formatting explicitly


Contributing

Have ideas for new prompt templates? Common report formats we should support? We welcome feedback on what prompts would be most valuable for your solar monitoring workflow.

Contact AVA Asia for feature requests and suggestions.