diff --git a/index.ts b/index.ts index 370e29d..4bfbab8 100644 --- a/index.ts +++ b/index.ts @@ -3387,7 +3387,8 @@ async function getPipelineJobOutput( async function createPipeline( projectId: string, ref: string, - variables?: Array<{ key: string; value: string }> + variables?: Array<{ key: string; value: string }>, + inputs?: Record ): Promise { projectId = decodeURIComponent(projectId); // Decode project ID const url = new URL( @@ -3398,6 +3399,9 @@ async function createPipeline( if (variables && variables.length > 0) { body.variables = variables; } + if (inputs && Object.keys(inputs).length > 0) { + body.inputs = inputs; + } const response = await fetch(url.toString(), { method: "POST", @@ -4940,8 +4944,8 @@ server.setRequestHandler(CallToolRequestSchema, async request => { } case "create_pipeline": { - const { project_id, ref, variables } = CreatePipelineSchema.parse(request.params.arguments); - const pipeline = await createPipeline(project_id, ref, variables); + const { project_id, ref, variables, inputs } = CreatePipelineSchema.parse(request.params.arguments); + const pipeline = await createPipeline(project_id, ref, variables, inputs); return { content: [ { diff --git a/schemas.ts b/schemas.ts index 370f2f7..681eed3 100644 --- a/schemas.ts +++ b/schemas.ts @@ -273,6 +273,10 @@ export const CreatePipelineSchema = z.object({ ) .optional() .describe("An array of variables to use for the pipeline"), + inputs: z + .record(z.string()) + .optional() + .describe("Input values for spec-based pipelines (key-value pairs)"), }); // Schema for retrying a pipeline