Replace the content and description of a structured prompt, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated prompt source document. Requires project.agents.write.
Arguments
projectReferenceString!requiredidString!requiredThe id of the definition, from its list.
inputUpdatePromptInput!requiredinput.descriptionStringReplaces the description; omit it or send null to clear it.
input.contentString!requiredinput.sourceTargetKindWriteTargetKindThe source to write; default project. One of
project,preview_branch.input.targetBranchIdIDRequired with the kind preview_branch.
Responses
mutation UpdatePrompt($projectReference: String!, $id: String!, $input: UpdatePromptInput!) { updatePrompt(projectReference: $projectReference, id: $id, input: $input) { id name description content sourcePath source editMode sourceOnlyReasons }}{ "data": { "updatePrompt": { "id": "string", "name": "string", "description": "string", "content": "string", "sourcePath": "string", "source": "string", "editMode": "structured", "sourceOnlyReasons": [ "string" ] } }}The PromptSource! in data.updatePrompt.