Skip to main content
Glama

update_test_case

Update fields on a specific test case version by providing its ID and version number. Modify summary, precondition, priority, status, assignee, labels, components, fix versions, or custom fields. Returns 204 on success.

Instructions

Update fields on a specific version of a test case. Requires both the test case id and versionNo (usually 1 for latest). Priority and status take integer IDs. Returns 204 on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTest case ID
versionNoYesVersion number to update
summaryNo
preconditionNo
priorityNoPriority integer ID
statusNoStatus integer ID
assigneeNoAssignee Jira account ID
labelsNo
componentsNo
fixVersionsNo
customFieldsNo

Implementation Reference

  • src/index.ts:243-266 (registration)
    The tool 'update_test_case' is registered via the 'tool()' helper wrapper around server.registerTool(). It accepts an id, versionNo, and optional fields (summary, precondition, priority, status, assignee, labels, components, fixVersions, customFields).
    tool(
      "update_test_case",
      "Update fields on a specific version of a test case. Requires both the test case id and versionNo (usually 1 for latest). Priority and status take integer IDs. Returns 204 on success.",
      {
        id: ID.describe("Test case ID"),
        versionNo: z.number().int().describe("Version number to update"),
        summary: z.string().optional(),
        precondition: z.string().optional(),
        priority: z.number().int().optional().describe("Priority integer ID"),
        status: z.number().int().optional().describe("Status integer ID"),
        assignee: z.string().optional().describe("Assignee Jira account ID"),
        labels: z.array(z.number().int()).optional(),
        components: z.array(z.number().int()).optional(),
        fixVersions: z.array(z.number().int()).optional(),
        customFields: z.array(CustomField).optional(),
      },
      async ({ id, versionNo, ...rest }) => {
        await qtmFetch(`/testcases/${id}/versions/${versionNo}`, {
          method: "PUT",
          body: JSON.stringify(rest),
        });
        return ok({ message: `Test case ${id} version ${versionNo} updated` });
      }
    );
  • The handler function for 'update_test_case' destructures id and versionNo from input, sends a PUT request to /testcases/{id}/versions/{versionNo} with the remaining fields as JSON body, and returns a success message.
    async ({ id, versionNo, ...rest }) => {
      await qtmFetch(`/testcases/${id}/versions/${versionNo}`, {
        method: "PUT",
        body: JSON.stringify(rest),
      });
      return ok({ message: `Test case ${id} version ${versionNo} updated` });
    }
  • Input schema for 'update_test_case' defines required id (string|number) and versionNo (int), plus optional fields: summary, precondition, priority, status, assignee, labels, components, fixVersions, and customFields (array of CustomField objects).
    {
      id: ID.describe("Test case ID"),
      versionNo: z.number().int().describe("Version number to update"),
      summary: z.string().optional(),
      precondition: z.string().optional(),
      priority: z.number().int().optional().describe("Priority integer ID"),
      status: z.number().int().optional().describe("Status integer ID"),
      assignee: z.string().optional().describe("Assignee Jira account ID"),
      labels: z.array(z.number().int()).optional(),
      components: z.array(z.number().int()).optional(),
      fixVersions: z.array(z.number().int()).optional(),
      customFields: z.array(CustomField).optional(),
    },
  • The CustomField Zod schema referenced by the tool's input, defining optional id, value, and cascadeValue fields for custom field support.
    const CustomField = z.object({
      id: z.string().describe("Custom field ID, e.g. qcf_1"),
      value: z.string().optional().describe("Field value"),
      cascadeValue: z.string().optional().describe("Cascade dropdown value"),
    });
  • src/index.ts:171-184 (registration)
    The 'tool()' helper function that wraps server.registerTool() for concise tool registration.
    /** Thin wrapper around registerTool for concise, non-deprecated tool registration. */
    const tool = <Shape extends z.ZodRawShape>(
      name: string,
      description: string,
      inputSchema: Shape,
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      callback: (args: z.infer<z.ZodObject<Shape>>) => Promise<any>
    ) =>
      server.registerTool(
        name,
        { description, inputSchema },
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        callback as any
      );
Behavior2/5

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

The description discloses that it updates fields, requires two parameters, and returns 204 on success, but it omits critical behavioral details such as whether it performs a partial update or full replacement, what happens if the version doesn't exist, authorization requirements, or error responses. With no annotations, the description carries the full burden, and it is insufficient.

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 concise with three sentences, front-loading the purpose and key requirements. It efficiently conveys core information without wordiness, earning a high score for conciseness, though a small amount of additional detail could be justified.

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

Completeness3/5

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

Given the complexity of 11 parameters, no output schema, and no annotations, the description provides the minimum viable information: required parameters, return code, and an example of integer IDs. However, it leaves significant gaps in understanding behavior for optional fields, error handling, and distinction from related tools, making it adequate but not comprehensive.

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

Parameters2/5

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

The description only adds meaning for three parameters (id, versionNo, priority/status) beyond the input schema, which already provides descriptions for many parameters. With schema coverage at 45%, the description does not compensate for the missing parameter information, leaving many fields like summary, precondition, customFields unaddressed.

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 it updates fields on a specific version of a test case, using the verb 'update' and resource 'test case version'. It distinguishes itself from sibling tools like update_test_cycle or update_test_execution by focusing on test case version and mentioning required parameters id and versionNo.

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

Usage Guidelines3/5

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

The description says requires both test case id and versionNo, and notes versionNo is usually 1 for latest, giving implied usage context. However, it lacks explicit guidance on when not to use this tool (e.g., for creating or deleting a test case) or alternatives like bulk_update_test_executions.

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/salehrifai42/qmetrymcp'

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