Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Set Project Context

qtm4j_set_project_context
Idempotent

Set the active QTM4J project for the session to enable project-specific operations and pre-load priority/status options for NLP mapping.

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').
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

The description adds substantial behavior beyond annotations: it pre-loads priority/status values for NLP mapping, resets context on repeated calls, and clears only the previous project's cached field metadata when switching. These details align with idempotentHint and neither contradict readOnlyHint nor destructiveHint.

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

Conciseness5/5

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

The description is long but tightly organized with clear sections: purpose, parameters, output, use cases, examples, and hints. Every sentence earns its place, and the critical prerequisite is stated in the first sentence. The structure makes the detailed content easy for an agent to parse.

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?

The tool is simple (one parameter) but contextually critical, and the description covers everything needed to call it correctly: when to call it, how to discover project keys, what the response contains, and what happens on repeated or switching calls. Examples further remove ambiguity.

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%, so the parameter is already documented. The description adds extra value by explaining exact-match requirements, directing the agent to get_projects for valid keys, providing concrete examples, and describing the response's availableFields for subsequent NLP mapping.

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 opens with a specific verb and resource: 'Set the active QTM4J project for the current session.' It also states the tool's role as a prerequisite for project-specific operations, making its purpose unmistakable and distinguishable from related tools like qtm4j_get_projects.

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?

Usage guidance is explicit and actionable: it must be called before any project-specific operation, is used for session start or mid-conversation switching, and can validate project keys. It also names get_projects as the discovery alternative and explicitly instructs the agent to never auto-select a project without user confirmation.

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

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