createPrompt

Create a prompt source file in the project source or a preview branch so agents and clients can reuse its text; returns the prompt source document. Requires project.agents.write.

Arguments

  • projectReferenceString!required

  • inputCreatePromptInput!required

  • input.idString!required

    Becomes the file name and the prompt id.

  • input.descriptionString

  • input.contentString!required

  • input.sourceTargetKindWriteTargetKind

    The source to write; default project. One of project, preview_branch.

  • input.targetBranchIdID

    Required with the kind preview_branch.

Responses

mutation CreatePrompt($projectReference: String!, $input: CreatePromptInput!) {  createPrompt(projectReference: $projectReference, input: $input) {    id    name    description    content    sourcePath    source    editMode    sourceOnlyReasons  }}
{  "data": {    "createPrompt": {      "id": "string",      "name": "string",      "description": "string",      "content": "string",      "sourcePath": "string",      "source": "string",      "editMode": "structured",      "sourceOnlyReasons": [        "string"      ]    }  }}

The PromptSource! in data.createPrompt.