Skip to main content
Glama

update_test_cycle

Update a test cycle's metadata (summary, description, priority, status, dates, custom fields) by providing the cycle ID or key. A successful update returns 204.

Instructions

Update a test cycle's metadata (summary, description, priority, status, dates, custom fields). Pass the internal id or key. Returns 204 on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTest cycle ID
summaryNo
descriptionNo
priorityNo
statusNo
assigneeNo
plannedStartDateNoISO 8601 date
plannedEndDateNoISO 8601 date
customFieldsNo

Implementation Reference

  • The handler function for the 'update_test_cycle' tool. It destructures 'id' from the rest of the input, makes a PUT request to /testcycles/{id} with the remaining fields as JSON body, and returns a success message.
    async ({ id, ...rest }) => {
      await qtmFetch(`/testcycles/${id}`, { method: "PUT", body: JSON.stringify(rest) });
      return ok({ message: `Test cycle ${id} updated` });
    }
  • The schema definition for 'update_test_cycle'. Accepts: id (string|number), and optional fields summary, description, priority, status, assignee, plannedStartDate, plannedEndDate (ISO 8601), and customFields (array of CustomField objects).
    {
      id: ID.describe("Test cycle ID"),
      summary: z.string().optional(),
      description: z.string().optional(),
      priority: z.string().optional(),
      status: z.string().optional(),
      assignee: z.string().optional(),
      plannedStartDate: z.string().optional().describe("ISO 8601 date"),
      plannedEndDate: z.string().optional().describe("ISO 8601 date"),
      customFields: z.array(CustomField).optional(),
  • src/index.ts:172-184 (registration)
    The 'tool' helper function that wraps server.registerTool(). It registers the tool with its name, description, input schema, and callback on the McpServer instance.
    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
      );
  • src/index.ts:391-409 (registration)
    The tool registration call for 'update_test_cycle', invoking the 'tool()' wrapper with name='update_test_cycle', description, schema, and handler callback. This connects the handler to the MCP server.
    tool(
      "update_test_cycle",
      "Update a test cycle's metadata (summary, description, priority, status, dates, custom fields). Pass the internal id or key. Returns 204 on success.",
      {
        id: ID.describe("Test cycle ID"),
        summary: z.string().optional(),
        description: z.string().optional(),
        priority: z.string().optional(),
        status: z.string().optional(),
        assignee: z.string().optional(),
        plannedStartDate: z.string().optional().describe("ISO 8601 date"),
        plannedEndDate: z.string().optional().describe("ISO 8601 date"),
        customFields: z.array(CustomField).optional(),
      },
      async ({ id, ...rest }) => {
        await qtmFetch(`/testcycles/${id}`, { method: "PUT", body: JSON.stringify(rest) });
        return ok({ message: `Test cycle ${id} updated` });
      }
    );
  • The qtmFetch helper function used by the update_test_cycle handler to make the PUT API call to QMetry.
    async function qtmFetch(
      path: string,
      options: RequestInit = {},
      attempt = 1
    ): Promise<unknown> {
      const url = `${BASE_URL}${path}`;
      const headers: Record<string, string> = {
        apiKey: API_KEY ?? "",
        "Content-Type": "application/json",
        Accept: "application/json",
        ...(options.headers as Record<string, string> | undefined),
      };
    
      const response = await fetch(url, { ...options, headers });
    
      // Exponential back-off for rate limiting (max 3 attempts)
      if (response.status === 429 && attempt < 3) {
        const retryAfter = Number.parseInt(
          response.headers.get("Retry-After") ?? "1",
          10
        );
        const delay = Math.max(retryAfter * 1000, 1000) * attempt;
        await new Promise((r) => setTimeout(r, delay));
        return qtmFetch(path, options, attempt + 1);
      }
    
      const text = await response.text();
      let body: unknown;
      try {
        body = text ? JSON.parse(text) : null;
      } catch {
        body = text;
      }
    
      if (!response.ok) {
        throw new Error(
          `HTTP ${response.status} ${response.statusText}: ${JSON.stringify(body)}`
        );
      }
    
      return body;
    }
Behavior2/5

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

No annotations are present, so the description bears full responsibility. It discloses the HTTP return status (204 on success), but lacks information on side effects, required permissions, error conditions, or whether updates are reversible. For a mutation tool, this 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.

Conciseness5/5

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

Two succinct sentences: first outlines the tool's purpose, second provides usage hint and response. No redundant information; every word adds value.

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 tool has 9 parameters, no output schema, and no annotations, the description covers the essential purpose, identifier passing, and response status. However, it omits details like validation rules, custom field structure guidance, and error handling, which are needed for full completeness.

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

Parameters3/5

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

Schema description coverage is low (33%), so the description must compensate. It lists the updatable fields, which adds context beyond the schema names, but it does not specify value formats or constraints for fields like priority or status. The list is helpful but incomplete.

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?

Description clearly specifies the action ('Update'), the resource ('test cycle'), and enumerates the metadata fields that can be updated (summary, description, priority, status, dates, custom fields). This distinguishes it from sibling tools like update_test_case or update_test_plan.

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?

Provides minimal guidance on how to use: 'Pass the internal id or key.' However, it does not discuss when to use this tool versus alternatives (e.g., when to update vs create a test cycle) or any prerequisites or restrictions.

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