> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agents.labs.bandwidth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a single-prompt agent

> MCP reference for update_single_prompt_agent.

Tool: `update_single_prompt_agent`. Requires **Editor, Admin, or Owner** in the applicable workspace and a connected [OAuth session](https://docs.agents.labs.bandwidth.com/mcp/authentication.md).

Supply at least one of `system_prompt` or `greeting`. Omit greeting to preserve it; use an empty string to clear it. Saves a draft while preserving the graph, QA nodes, configurations, and context variables. A workflow-canvas agent returns `not_single_prompt_agent`.

Inspect `updated`, `updated_fields`, and version state. Empty prompts, missing versions, invalid configuration, and trigger-path conflicts return structured failure results. The tool does not publish, call providers, or place a call; URL validation may resolve hostnames.

## Arguments

| Name | Type | Required | Defaults and limits |
| - | - | - | - |
| `greeting` | string or null | No | Default: `null` |
| `system_prompt` | string or null | No | Default: `null` |
| `workflow_id` | integer | Yes | See full schema |

## Example arguments

Replace sample resource IDs with IDs returned in your selected workspace.

```json theme={null}
{
  "workflow_id": 42,
  "greeting": "Welcome. How can I help?"
}
```

## Result and errors

The schema below describes MCP `structuredContent`, including the `result` wrapper where present. Your client may also display a text representation. Read success flags and structured errors before continuing; transport success alone does not prove the operation succeeded. Authentication, missing membership, and insufficient role can fail before a tool result is produced. See [troubleshooting](https://docs.agents.labs.bandwidth.com/mcp/troubleshooting.md).

**Effect:** Changes state. **Retry:** Do not blindly repeat successful calls. Discovery annotations describe behavior; they do not grant permission or replace confirmation for consequential actions.

> [accordion] Input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "greeting": {
>       "anyOf": [
>         {
>           "type": "string"
>         },
>         {
>           "type": "null"
>         }
>       ],
>       "default": null
>     },
>     "system_prompt": {
>       "anyOf": [
>         {
>           "type": "string"
>         },
>         {
>           "type": "null"
>         }
>       ],
>       "default": null
>     },
>     "workflow_id": {
>       "type": "integer"
>     }
>   },
>   "required": [
>     "workflow_id"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Result schema
>
> ```json theme={null}
> {
>   "properties": {
>     "result": {
>       "anyOf": [
>         {
>           "properties": {
>             "lifecycle_status": {
>               "enum": [
>                 "draft",
>                 "active",
>                 "paused",
>                 "archived"
>               ],
>               "type": "string"
>             },
>             "name": {
>               "type": "string"
>             },
>             "updated": {
>               "const": true,
>               "type": "boolean"
>             },
>             "updated_fields": {
>               "items": {
>                 "enum": [
>                   "system_prompt",
>                   "greeting"
>                 ],
>                 "type": "string"
>               },
>               "type": "array"
>             },
>             "version_number": {
>               "type": "integer"
>             },
>             "version_status": {
>               "const": "draft",
>               "type": "string"
>             },
>             "workflow_id": {
>               "type": "integer"
>             }
>           },
>           "required": [
>             "updated",
>             "workflow_id",
>             "name",
>             "lifecycle_status",
>             "version_status",
>             "version_number",
>             "updated_fields"
>           ],
>           "type": "object"
>         },
>         {
>           "properties": {
>             "error": {
>               "type": "string"
>             },
>             "error_code": {
>               "type": "string"
>             },
>             "errors": {
>               "items": {
>                 "properties": {
>                   "field": {
>                     "anyOf": [
>                       {
>                         "type": "string"
>                       },
>                       {
>                         "type": "null"
>                       }
>                     ]
>                   },
>                   "id": {
>                     "anyOf": [
>                       {
>                         "type": "string"
>                       },
>                       {
>                         "type": "integer"
>                       },
>                       {
>                         "type": "null"
>                       }
>                     ]
>                   },
>                   "kind": {
>                     "type": "string"
>                   },
>                   "message": {
>                     "type": "string"
>                   }
>                 },
>                 "required": [
>                   "kind",
>                   "id",
>                   "field",
>                   "message"
>                 ],
>                 "type": "object"
>               },
>               "type": "array"
>             },
>             "trigger_paths": {
>               "items": {
>                 "type": "string"
>               },
>               "type": "array"
>             },
>             "updated": {
>               "const": false,
>               "type": "boolean"
>             }
>           },
>           "required": [
>             "updated",
>             "error_code",
>             "error"
>           ],
>           "type": "object"
>         }
>       ]
>     }
>   },
>   "required": [
>     "result"
>   ],
>   "type": "object"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.