Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QMetry: Create Test Case

qmetry_create_test_case

Create test cases in QMetry with steps, metadata, and release/cycle mapping. Automatically resolves folder ID from project info.

Instructions

Create a new test case in QMetry with steps, metadata, and release/cycle mapping.

Toolset: Test Cases

Parameters:

  • tcFolderID (string): Test Case folder ID - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific folder ID. System will fetch project info using the projectKey and extract rootFolders.TC.id automatically. Manual folder ID only needed if you want to target a specific sub-folder.

  • steps (array)

  • name (string) required

  • priority (number)

  • component (array)

  • testcaseOwner (number)

  • testCaseState (number)

  • testCaseType (number)

  • estimatedTime (number)

  • testingType (number)

  • description (string)

  • associateRelCyc (boolean)

  • releaseCycleMapping (array)

Output Description: JSON object containing the new test case ID, summary, and creation metadata.

Use Cases: 1. Create a basic test case with just a name and folder 2. Add detailed steps with custom fields (UDFs) to a test case 3. Associate test case with specific release/cycle for planning 4. Set priority, owner, component, and other metadata using valid IDs from project info 5. Create test cases for automation or manual testing types 6. Add test case to a specific folder using tcFolderID 7. Include estimated execution time and description 8. Map test case to multiple cycles/releases

Examples:

  1. Create a test case in the root folder (auto-resolved)

{
  "name": "Login Test Case"
}

Expected Output: Test case created in the root test case folder with ID and summary details

  1. Create a simple test case in folder 102653

{
  "tcFolderID": "102653",
  "name": "Login Test Case"
}

Expected Output: Test case created with ID and summary details

  1. Create a test case with steps and metadata

{
  "tcFolderID": "102653",
  "name": "Test Case 1",
  "steps": [
    {
      "orderId": 1,
      "description": "First Step",
      "inputData": "First Data",
      "expectedOutcome": "First Outcome",
      "UDF": {
        "customField1": "Custom Field Data A",
        "customField2": "Custom Field Data B"
      }
    }
  ],
  "priority": 2025268,
  "component": [
    2025328
  ],
  "testcaseOwner": 1467,
  "testCaseState": 2025271,
  "testCaseType": 2025282,
  "estimatedTime": 10,
  "description": "Description",
  "testingType": 2025275,
  "associateRelCyc": true,
  "releaseCycleMapping": [
    {
      "release": 14239,
      "cycle": [
        21395
      ],
      "version": 1
    }
  ]
}

Expected Output: Test case created with steps and metadata

Hints: 1. If tcFolderID is not provided, it will be auto-resolved to the root test case folder using project info (rootFolders.TC.id). 2. To get valid values for priority, owner, component, etc., call the project info tool and use the returned customListObjs IDs. 3. If the user provides a priority name (e.g. 'Blocker'), fetch project info, find the matching priority in customListObjs.priority[index].name, and use its ID in the payload. If the name is not found, skip the priority field (it is not required) and show a user-friendly message: 'Test case created without priority, as given priority is not available in the current project.' 4. If the user provides a component name, fetch project info, find the matching component in customListObjs.component[index].name, and use its ID in the payload. If the name is not found, skip the component field (it is not required) and show a user-friendly message: 'Test case created without component, as given component is not available in the current project.' 5. If the user provides an owner name, fetch project info, find the matching owner in customListObjs.owner[index].name, and use its ID in the payload as testcaseOwner. If the name is not found, skip the testcaseOwner field (it is not required) and show a user-friendly message: 'Test case created without owner, as given owner is not available in the current project.' 6. If the user provides a test case state name, fetch project info, find the matching state in customListObjs.testCaseState[index].name, and use its ID in the payload as testCaseState. If the name is not found, skip the testCaseState field (it is not required) and show a user-friendly message: 'Test case created without test case state, as given state is not available in the current project.' 7. If the user provides a test case type name, fetch project info, find the matching type in customListObjs.testCaseType[index].name, and use its ID in the payload as testCaseType. If the name is not found, skip the testCaseType field (it is not required) and show a user-friendly message: 'Test case created without test case type, as given type is not available in the current project.' 8. If the user provides a testing type name, fetch project info, find the matching type in customListObjs.testingType[index].name, and use its ID in the payload as testingType. If the name is not found, skip the testingType field (it is not required) and show a user-friendly message: 'Test case created without testing type, as given testing type is not available in the current project.' 9. Example: If user says 'Create test case with title "High priority test case" and set priority to "Blocker"', first call project info, map 'Blocker' to its ID, and use that ID for the priority field in the create payload. If user says 'set priority to "Urgent"' and 'Urgent' is not found, skip the priority field and show: 'Test case created without priority, as given priority is not available in the current project.' 10. tcFolderID is required; use the root folder ID from project info or a specific folder. 11. Steps are optional but recommended for manual test cases. 12. If the user provides a prompt like 'create test case with steps as step 1 - Go to login page, step 2 - give credential, step 3 - go to test case page, step 4 - create test case', LLM should parse each step and convert it into the steps payload array, mapping each step to an object with orderId, description, and optionally inputData and expectedOutcome. 13. Example mapping: 'step 1 - Go to login page' → { orderId: 1, description: 'Go to login page' }. 14. LLM should increment orderId for each step, use the step text as description, and optionally infer inputData/expectedOutcome if provided in the prompt. 15. Demo steps payload: steps: [ { orderId: 1, description: 'First Step', inputData: 'First Data', expectedOutcome: 'First Outcome', UDF: { customField1: 'Custom Field Data A', customField2: 'Custom Field Data B' } }, ... ] 16. UDF fields in steps must match your QMetry custom field configuration. 17. Release/cycle mapping is optional but useful for planning. 18. If the user wants to link or associate a release and cycle to the test case, set associateRelCyc: true in the payload. 19. If the user provides a release ID, map it from projects.releases[index].releaseID in the project info response, and use that ID in releaseCycleMapping. 20. If the user provides both release and cycle IDs, validate both against the current project's releases and cycles; if valid, use them in releaseCycleMapping. 21. When adding releaseCycleMapping, always include the 'version' field (usually set to 1) in each mapping object. The correct format is: { release: , cycle: [], version: 1 }. If 'version' is missing, the request will fail. 22. If the user provides a release name, map it to its ID from project info; if a cycle name is provided, map it to its ID from the associated release's builds list. 23. Example payload: releaseCycleMapping: [ { release: , cycle: [], version: 1 } ] 24. LLM should ensure that provided release/cycle names or IDs exist in the current project before using them in the payload. If not found, skip and show a user-friendly message: 'Test case created without release/cycle association, as given release/cycle is not available in the current project.' 25. All IDs (priority, owner, etc.) must be valid for your QMetry instance. 26. If a custom field is mandatory, include it in the UDF object. 27. Estimated time is in minutes. 28. Description and testingType are optional but recommended for clarity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
stepsNo
priorityNo
componentNo
tcFolderIDNoTest Case folder ID - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific folder ID. System will fetch project info using the projectKey and extract rootFolders.TC.id automatically. Manual folder ID only needed if you want to target a specific sub-folder.
descriptionNo
testingTypeNo
testCaseTypeNo
estimatedTimeNo
testCaseStateNo
testcaseOwnerNo
associateRelCycNo
releaseCycleMappingNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false (write operation) and no destructiveHint=true. The description explains creation behavior, including auto-resolution of tcFolderID and how to map human-readable names to IDs via project info. It adds context beyond annotations, though it omits rate limits or auth specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-organized with clear sections (e.g., 'Parameters', 'Use Cases', 'Examples', 'Hints'). It is front-loaded with the purpose and toolset. While comprehensive, some hints are repetitive (e.g., 3-8 follow a similar pattern), making it slightly less concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but an output description is provided. The tool has 13 parameters (1 required), and the description covers all with detailed examples (3 JSON examples) and 28 hints addressing edge cases like ID mapping, UDF fields, and release/cycle validation. For a complex creation tool, this is highly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 8% (only tcFolderID has a short description). The description compensates thoroughly by detailing each parameter: tcFolderID auto-resolution, steps structure with UDF, and hints for converting names to IDs for priority, component, owner, etc. This adds significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Create a new test case in QMetry with steps, metadata, and release/cycle mapping.' This provides a specific verb ('Create') and resource ('test case') with scope ('in QMetry'). It distinguishes from sibling tools like qmetry_update_test_case or qtm4j_create_test_case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a 'Use Cases' section with 8 scenarios (e.g., 'Create a basic test case with just a name') and hints like when to provide tcFolderID vs auto-resolve. It implies creation context but doesn't explicitly state when not to use this tool (e.g., for updates).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SmartBear/smartbear-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server