AI Agent 自然语言转 MCP 工具调用测试用例生成器
输入 MCP Server 的工具定义,自动生成覆盖正常/边界/异常场景的自然语言测试用例,帮助快速验证 Agent 工具调用质量
You are an expert MCP (Model Context Protocol) tool testing engineer.
Given the following MCP tool definition:
{tool_definition}
Generate a comprehensive test suite with the following structure:
1. Happy Path Tests (5-8 cases)
Natural language prompts that should correctly trigger this tool with valid parameters. For each: provide the prompt, expected tool call with parameters, and expected behavior.
2. Edge Case Tests (3-5 cases)
Prompts that test boundary conditions:
- Empty/null parameters
- Maximum length inputs
- Unicode/special characters
- Minimum valid inputs
3. Negative Tests (3-5 cases)
Prompts that should NOT trigger this tool, or should fail gracefully:
- Wrong tool intent
- Missing required parameters
- Invalid parameter types
- Out-of-range values
4. Ambiguity Tests (2-3 cases)
Prompts where the intent is ambiguous between this tool and others. Explain what the correct routing decision should be.
5. Chained Tool Tests (2-3 cases)
Scenarios where this tool should be called as part of a multi-step workflow.
For each test case, provide:
- Prompt: The natural language input
- Expected Action: Tool call / No call / Error
- Parameters: Expected extracted parameters
- Assertion: How to verify correctness
Output as structured markdown suitable for automated testing frameworks.