Skip to main content
Glama

update_case

Modify existing test case details such as title, description, steps, severity, and tags in QASE test management platform. Ensure accurate and up-to-date test case documentation.

Instructions

Update an existing test case

Input Schema

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

Implementation Reference

  • The core handler function that performs the actual update case operation using the Qase client, including data conversion.
    export const updateCase = pipe( ( code: string, id: number, data: Omit<z.infer<typeof UpdateCaseSchema>, 'code' | 'id'>, ) => client.cases.updateCase(code, id, convertCaseData(data)), toResult, );
  • Zod schema defining the input parameters for the update_case tool.
    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)
    Registration of the update_case tool in the MCP server's list of tools, including name, description, and input schema.
    { name: 'update_case', description: 'Update an existing test case', inputSchema: zodToJsonSchema(UpdateCaseSchema), },
  • MCP server request handler that dispatches the update_case tool call, parses arguments, and invokes the core updateCase function.
    .with({ name: 'update_case' }, ({ arguments: args }) => { const { code, id, ...caseData } = UpdateCaseSchema.parse(args); return updateCase(code, id, caseData); })
  • Helper function to convert the input data format for the Qase API, 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, });

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