Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Set Project Context

qtm4j_set_project_context
Idempotent

Set 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:

  1. Set SCRUM project as active

{
  "projectKey": "SCRUM"
}

Expected Output: Project context set to SCRUM (ID: 10000)

  1. 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

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesProject key (e.g., 'SCRUM'). Use the get_projects tool to discover available project keys.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesConfirmation message
projectIdYesNumeric project ID
projectKeyYesProject key
projectNameYesProject name
availableFieldsNoAvailable 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').
Behavior5/5

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

Describes behavioral traits beyond annotations: pre-loads values, clears cached metadata on switch, resets context on second call. Also explains output structure with availableFields for NLP mapping, adding value over the provided annotations.

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?

Well-structured with clear sections (purpose, parameters, output, use cases, examples, hints). Front-loaded with essential purpose. Slightly redundant in repeated warnings, but overall efficient and organized.

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?

Complete coverage for a context-setting tool: explains prerequisite, output details, multiple use cases, examples, and hints. Given the presence of an output schema and sibling tools, the description fully equips the agent to use the tool correctly.

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

Parameters4/5

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

Schema coverage is 100% for the single parameter. The description adds useful context: exact match requirement, example, and reference to get_projects for discovery. This enhances the schema but could include more detail on key format constraints.

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 the tool sets the active QTM4J project for the current session, with a specific verb and resource. It distinguishes from siblings by emphasizing its prerequisite role for project-specific operations.

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

Usage Guidelines5/5

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

Explicitly states when to use (before any project-specific tool) and when not to (never auto-select). Provides alternative (use get_projects to discover keys) and clear hints including a critical warning and step-by-step instructions.

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