QTM4J: Set Project Context
qtm4j_set_project_contextSet the active project for your session to enable project-specific operations. Pre-loads priority and status values for mapping user input via natural language.
Instructions
Set the active QTM4J project for the current session. Must be called before any project-specific operation. Pre-loads priority and status values so you can map user-provided names to valid options via NLP.
Toolset: Projects
Parameters:
projectKey (string) required: Project key (e.g., 'SCRUM'). Use the get_projects tool to discover available project keys.
Output Description: JSON object with projectId, projectKey, projectName, confirmation message, and availableFields. availableFields contains priority and status options for NLP mapping in subsequent tool calls.
Use Cases: 1. Set the active project at the start of a new conversation 2. Switch to a different project mid-conversation 3. Validate that a project key exists before performing operations 4. Establish project context required by all project-specific tools
Examples:
Set SCRUM project as active
{
"projectKey": "SCRUM"
}Expected Output: Project context set to SCRUM (ID: 10000)
Switch to AD project
{
"projectKey": "AD"
}Expected Output: Project context switched to AD
Hints: 1. CRITICAL: This tool MUST be called before ANY project-specific tool. 2. NEVER auto-select a project. If the user does not specify a project key, call get_projects first, present the list to the user and ask them to choose. Do NOT pick one on their behalf. 3. The project key must be an exact match (e.g., 'SCRUM', not 'scrum project'). 4. After calling this tool, use the availableFields in the response to map user input via NLP (e.g. user says 'Major' → send 'High', user says 'Critical' → send 'Blocker'). 5. Switching projects clears the cached field metadata of the previous project only. 6. If this tool is called again in the same session, it resets the context to the new project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectKey | Yes | Project key (e.g., 'SCRUM'). Use the get_projects tool to discover available project keys. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Confirmation message | |
| projectId | Yes | Numeric project ID | |
| projectKey | Yes | Project key | |
| projectName | Yes | Project name | |
| availableFields | No | Available field values keyed by field name (e.g. 'priority', 'testcase_status'). Use these to map user input via NLP (e.g. user says 'Major' → send 'High'). |