create_shared_step
Generate a shared step for test cases by defining actions, expected results, and data. Simplify test case creation and reuse across projects in QASE MCP Server.
Instructions
Create a new shared step
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| code | Yes | ||
| data | No | ||
| expected_result | No | ||
| steps | No | ||
| title | Yes |
Implementation Reference
- src/index.ts:428-431 (handler)MCP tool handler for create_shared_step: parses input using schema, extracts code and stepData, calls the createSharedStep helper..with({ name: 'create_shared_step' }, ({ arguments: args }) => { const { code, ...stepData } = CreateSharedStepSchema.parse(args); return createSharedStep(code, stepData); })
- src/index.ts:250-254 (registration)Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema.{ name: 'create_shared_step', description: 'Create a new shared step', inputSchema: zodToJsonSchema(CreateSharedStepSchema), },
- src/operations/shared-steps.ts:18-34 (schema)Zod schema defining input for create_shared_step tool: code, title, action, optional expected_result, data, steps array.export const CreateSharedStepSchema = z.object({ code: z.string(), title: z.string(), action: z.string(), expected_result: z.string().optional(), data: 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(), });
- src/operations/shared-steps.ts:77-80 (helper)Helper function createSharedStep: pipes client.sharedSteps.createSharedStep to toResult wrapper.export const createSharedStep = pipe( client.sharedSteps.createSharedStep.bind(client.sharedSteps), toResult, );