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

# Update Prompt Tool

> Update an existing prompt tool



## OpenAPI

````yaml /public-apis/openapi/prompt-tools.json put /v1/prompt-tools
openapi: 3.0.0
info:
  version: 1.0.0
  contact:
    name: Maxim Engineering
    email: eng@getmaxim.ai
  title: Maxim SDK API - prompt-tools
  description: API documentation for Maxim SDK prompt-tools endpoints
servers:
  - url: https://api.getmaxim.ai
security: []
paths:
  /v1/prompt-tools:
    put:
      tags:
        - Prompt Tool
      summary: Update Prompt Tool
      description: Update an existing prompt tool
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceId:
                  type: string
                  description: Unique identifier for the workspace
                id:
                  type: string
                  description: Unique identifier for the prompt tool
                name:
                  type: string
                  description: Name of the prompt tool
                description:
                  type: string
                  description: Description of the prompt tool
                config:
                  anyOf:
                    - type: object
                      properties:
                        args:
                          type: string
                        code:
                          type: string
                        lang:
                          type: string
                          enum:
                            - javascript
                          default: javascript
                        scripts:
                          type: string
                        sample:
                          type: string
                        schema:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - function
                            function:
                              type: object
                              properties:
                                name:
                                  type: string
                                description:
                                  type: string
                                parameters:
                                  type: object
                                  additionalProperties:
                                    nullable: true
                              required:
                                - name
                                - description
                          required:
                            - type
                            - function
                      required:
                        - args
                        - code
                        - schema
                      title: Program
                    - type: object
                      properties:
                        headers:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              key:
                                type: string
                                minLength: 1
                              value:
                                type: string
                            required:
                              - id
                              - key
                              - value
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        params:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              key:
                                type: string
                                minLength: 1
                              value:
                                type: string
                            required:
                              - id
                              - key
                              - value
                        payload:
                          type: string
                        scripts:
                          type: string
                        url:
                          type: string
                        schema:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - function
                            function:
                              type: object
                              properties:
                                name:
                                  type: string
                                description:
                                  type: string
                                parameters:
                                  type: object
                                  additionalProperties:
                                    nullable: true
                              required:
                                - name
                                - description
                          required:
                            - type
                            - function
                      required:
                        - method
                        - url
                        - schema
                      title: HTTP(s) API
                    - type: object
                      properties:
                        schema:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - function
                            function:
                              type: object
                              properties:
                                name:
                                  type: string
                                description:
                                  type: string
                                parameters:
                                  type: object
                                  additionalProperties:
                                    nullable: true
                              required:
                                - name
                                - description
                                - parameters
                          required:
                            - type
                            - function
                      required:
                        - schema
                      title: Schema
                  description: Configuration for the prompt tool
                folderId:
                  type: string
                  nullable: true
                  description: Folder ID
                newWorkspaceId:
                  type: string
                  description: New Workspace ID if moving
              required:
                - workspaceId
                - id
      responses:
        '200':
          description: Prompt tool updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                      type:
                        type: string
                      config:
                        nullable: true
                      folderId:
                        type: string
                        nullable: true
                      workspaceId:
                        type: string
                      accountId:
                        type: string
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      fromMcpServer:
                        type: string
                    required:
                      - id
                      - name
                      - description
                      - type
                      - workspaceId
                      - accountId
                      - createdAt
                      - updatedAt
                required:
                  - data
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized
        '404':
          description: Prompt tool not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-maxim-api-key
      description: API key for authentication

````