createTool

Create a project tool source file in the project source or a preview branch so project agents can call it; returns the tool source document. Requires project.agents.write.

Arguments

  • projectReferenceString!required

  • inputCreateToolInput!required

  • input.idString!required

    Becomes the file name and the tool id.

  • input.descriptionString

  • input.sourceTargetKindWriteTargetKind

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

  • input.targetBranchIdID

    Required with the kind preview_branch.

Responses

mutation CreateTool($projectReference: String!, $input: CreateToolInput!) {  createTool(projectReference: $projectReference, input: $input) {    id    name    description    sourcePath    source    editMode    sourceOnlyReasons  }}
{  "data": {    "createTool": {      "id": "string",      "name": "string",      "description": "string",      "sourcePath": "string",      "source": "string",      "editMode": "structured",      "sourceOnlyReasons": [        "string"      ]    }  }}

The ToolSource! in data.createTool.