Best practices for MCP prompting
The Tosca Cloud Model Context Protocol (MCP) integration lets you use natural language to review and manage your test automation tasks. For example, you can instruct the AI to create a new test case for a particular flow, move it to a folder, and add it to a playlist, all via prompts.
Use effective prompts to get the most from your Tosca Cloud MCP integration. This topic explains how to interact with your testing platform through natural language. It includes clear actions, examples, and best practices.
Core principles
To get the most of Tosca Cloud MCP, write clear and focused prompts. Set the right context, use simple and direct language, and break your requests into steps. Follow these fundamental principles to create clear instructions that help MCP give you the results you want:
Use precise terminology and describe exactly what you want to do. Include any relevant context such as project, folder, or test case name.
Good examples:
“Show me the failed test cases from the last Regression run.”
“Execute the Login Flow test case in the QA-Workspace.”
Avoid vague prompts:
“Check the test.”
“Run something.”
Help the MCP understand where and what to act on. Include project names, test case IDs, or time frames when relevant.
Good examples:
“Why did the Overnight Regression test fail? I’m checking result ID abc-123 in the QA Workspace.”
“Compare the results between yesterday’s Smoke Tests and today’s Feature Branch run.”
Start broad, then narrow your focus as you go. This helps the MCP deliver more targeted results.
Example flow:
“Show me recent test results.” → overview
“Focus on failed tests from last week.” → filter
“What caused the failures in the Payment Service?” → analysis
“Suggest fixes for those errors.” → action
Break down large or multi-step tasks so MCP can handle them effectively.
Instead of:
“Give me everything about performance issues and make a full report.”
Use:
“Create a performance summary report with:
-
Metrics from result XYZ
-
Comparison to the previous baseline
-
Detected bottlenecks
-
Optimization recommendations
-
Executive summary format”
Effective prompt patterns
Use these patterns to structure your prompts for better results:
Structure: [Question] + [Context] + [Desired Action]
Example:
"What’s causing the failed steps [Question]
in the ‘Checkout Flow’ test case from this week’s regression run [Context]?
Please analyze the results and suggest how to fix the errors [Action]."
Structure: Compare [Item A] with [Item B] focusing on [Specific Metrics]
Example:
"Compare the ‘User Registration’ and ‘Login’ test cases [Item A/B]
focusing on the number of failed steps and execution time [Specific Metrics].
Highlight which one shows more stability across recent runs."
Structure: [Problem Statement] + [Context] + [Investigation Request]
Example:
"The ‘Payment Validation’ module is missing from the Regression folder [Problem Statement].
It should be under ‘Release1’ according to our structure [Context].
Can you find out where it was moved and restore the correct organization [Investigation Request]?"
Structure: Create [Report Type] for [Audience] including [Specific Elements]
Example:
"Create a summary report for the QA team including:
The latest playlist run results
The number of passed and failed test cases
The top three recurring test failures
Recommendations for next regression cycle improvements."
Manage your assets
Use these patterns to create, analyze, and refine your assets:
"Find all regression test cases"
With previous context, you can use shorter prompts:
"Search all steps made in the registration form"
"Find all test cases related to [test case name] in workspace [workspace name]"
"Show the details of the test case [test case name] in workspace [workspace name]"
"Create test case for [name of the flow] flow"
"Improve my [test case name] test case"
"Show errors in the [test case name] test case"
"Rename steps in [test case name] test case to standard naming"
"Clean up test step labels in [test case name] test case"
What's next?
Now that you understand MCP prompting best practices, you can set up your MCP connection if you haven't already.