# Remove application attachment

`application_definitions.remove_attachment`

Remove the current attachment from a file or signature block in the draft. First establish intent, identify the exact block/file and explain that the draft template will lose this attachment, then ask for a second explicit confirmation. Published versions are not changed.

[Application definitions guide](https://docs.levr.ai/mcp/resources/application_definitions.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: write. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "client_request_id": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "definition_slug": {
      "description": "Application form definition returned by application_definitions.list. Prefix: appdef_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "expected_revision": {
      "description": "Copy revision from application_definitions.get_config; a stale value rejects the write.",
      "minimum": 0,
      "type": "integer"
    },
    "provider_slug": {
      "description": "Provider that owns the application form definition. Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "stable_block_id": {
      "description": "Copy the file/signature block’s stable_block_id from application_definitions.get_config.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "provider_slug",
    "definition_slug",
    "stable_block_id",
    "expected_revision",
    "client_request_id"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attachment": {
          "description": "Always null after the attachment is removed.",
          "type": "null"
        },
        "definition_slug": {
          "description": "Stable identifier of the updated application form definition.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "revision": {
          "description": "Saved draft revision returned by this mutation.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "definition_slug",
        "revision",
        "attachment"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```

Check the result, then read the affected record to confirm your change.
