Skip to main content
Glama

update_case

Modify existing test cases in QASE by updating fields like title, description, steps, severity, priority, tags, and custom parameters to maintain accurate testing documentation.

Instructions

Update an existing test case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
idYes
titleNo
descriptionNo
preconditionsNo
postconditionsNo
severityNo
priorityNo
typeNo
behaviorNo
automationNo
statusNo
suite_idNo
milestone_idNo
layerNo
is_flakyNo
paramsNo
tagsNo
stepsNo
custom_fieldsNo

Implementation Reference

  • MCP tool handler for 'update_case': parses input using UpdateCaseSchema, extracts code, id, and rest data, then calls the updateCase function.
    .with({ name: 'update_case' }, ({ arguments: args }) => {
      const { code, id, ...caseData } = UpdateCaseSchema.parse(args);
      return updateCase(code, id, caseData);
    })
  • Zod schema defining the input structure for updating a test case, including code, id, and optional fields like title, steps, tags, etc.
    export const UpdateCaseSchema = z.object({
      code: z.string(),
      id: z.number(),
      title: z.string().optional(),
      description: z.string().optional(),
      preconditions: z.string().optional(),
      postconditions: z.string().optional(),
      severity: z.number().optional(),
      priority: z.number().optional(),
      type: z.number().optional(),
      behavior: z.number().optional(),
      automation: z.number().optional(),
      status: z.number().optional(),
      suite_id: z.number().optional(),
      milestone_id: z.number().optional(),
      layer: z.number().optional(),
      is_flaky: z.boolean().optional(),
      params: z
        .array(
          z.object({
            title: z.string(),
            value: z.string(),
          }),
        )
        .optional(),
      tags: z.array(z.string()).optional(),
      steps: z
        .array(
          z.object({
            action: z.string(),
            expected_result: z.string().optional(),
            data: z.string().optional(),
            position: z.number().optional(),
          }),
        )
        .optional(),
      custom_fields: z
        .array(
          z.object({
            id: z.number(),
            value: z.string(),
          }),
        )
        .optional(),
    });
  • src/index.ts:185-189 (registration)
    Tool registration in the list of available tools, specifying name, description, and input schema converted to JSON schema.
    {
      name: 'update_case',
      description: 'Update an existing test case',
      inputSchema: zodToJsonSchema(UpdateCaseSchema),
    },
  • Core updateCase function that transforms data using convertCaseData and calls the Qase client API to update the case, wrapped with toResult.
    export const updateCase = pipe(
      (
        code: string,
        id: number,
        data: Omit<z.infer<typeof UpdateCaseSchema>, 'code' | 'id'>,
      ) => client.cases.updateCase(code, id, convertCaseData(data)),
      toResult,
    );
  • Helper function to convert the case data format, specifically handling is_flaky boolean to int and params array to object.
    const convertCaseData = (
      data: Omit<z.infer<typeof UpdateCaseSchema>, 'code' | 'id'>,
    ) => ({
      ...data,
      is_flaky: data.is_flaky === undefined ? undefined : data.is_flaky ? 1 : 0,
      params: data.params
        ? data.params.reduce(
            (acc, param) => ({
              ...acc,
              [param.title]: [param.value],
            }),
            {},
          )
        : undefined,
    });
Behavior1/5

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

With no annotations provided, the description carries full burden but offers no behavioral details. It doesn't disclose that this is a mutation operation (implied by 'update'), what permissions are required, whether updates are reversible, rate limits, or what happens to unspecified fields (e.g., partial vs. full updates). This leaves critical gaps for safe tool invocation.

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 extremely concise—a single sentence with no wasted words. It's front-loaded with the core action, though this brevity comes at the cost of completeness. For conciseness alone, it's optimal.

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

Completeness1/5

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

Given the high complexity (20 parameters, 0% schema coverage, no annotations, no output schema), the description is severely incomplete. It doesn't explain the tool's behavior, parameter meanings, return values, or usage context. This is inadequate for a mutation tool with many undocumented inputs.

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?

Schema description coverage is 0%, so the schema provides no parameter documentation. The description adds no parameter semantics—it doesn't explain what 'code', 'id', or any of the 20 parameters mean, their formats, or constraints. This forces the agent to guess parameter purposes, which is inadequate for such a complex tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing test case' clearly states the action (update) and resource (test case), which is adequate. However, it doesn't differentiate this tool from sibling update tools like update_plan or update_suite, nor does it specify what aspects of a test case can be updated beyond the generic term.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing test case ID), compare with create_case for new cases, or explain when to use update_case versus other update tools in the sibling list. The agent must infer usage from context alone.

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/rikuson/mcp-qase'

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