# Read a Deal Application contract

`deal_applications.get_contract`

Discover the sections, question block keys, answer shapes, allowed values, repeatable groups, and supported operations in a Deal Application. Omit section_key for a compact section index, then read one section at a time for large applications.

[Deal applications guide](https://docs.levr.ai/mcp/resources/deal_applications.md)

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

Operation: read. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "application_id": {
      "description": "Deal Application id returned by deals.get or deals.create. Prefix: dapp_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "provider_slug": {
      "description": "Portal workspace where the Deal Application is available. Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "section_key": {
      "anyOf": [
        {
          "description": "Copy section_key from deal_applications.get_contract sections; omit for the section index.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Copy section_key from deal_applications.get_contract sections; omit for the section index."
    }
  },
  "required": [
    "provider_slug",
    "application_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": {
        "answers_revision": {
          "minimum": 0,
          "type": "integer"
        },
        "application_name": {
          "type": "string"
        },
        "contract_version": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "object": {
          "const": "application_contract",
          "type": "string"
        },
        "questions": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "answer_operations": {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "uniqueItems": true
              },
              "answer_shape": {
                "enum": [
                  "field",
                  "selection_list",
                  "file"
                ],
                "type": "string"
              },
              "block_key": {
                "description": "Stable public identifier for the referenced resource.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              "fields": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "choices": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "value",
                          "label"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "example": {},
                    "field_key": {
                      "type": "string"
                    },
                    "help_text": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_required": {
                      "type": "boolean"
                    },
                    "label": {
                      "type": "string"
                    },
                    "value_schema": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "field_key",
                    "label",
                    "help_text",
                    "is_required",
                    "value_schema",
                    "example"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "help_text": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_repeatable": {
                "type": "boolean"
              },
              "is_required": {
                "type": "boolean"
              },
              "kind": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "order": {
                "type": "integer"
              },
              "parent_block_key": {
                "anyOf": [
                  {
                    "description": "Stable public identifier for the referenced resource.",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Stable public identifier for the referenced resource."
              },
              "schema_key": {
                "type": "string"
              },
              "section_key": {
                "description": "Stable public identifier for the referenced resource.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              "visibility": {
                "type": "object"
              }
            },
            "required": [
              "block_key",
              "schema_key",
              "section_key",
              "parent_block_key",
              "kind",
              "answer_shape",
              "label",
              "help_text",
              "is_required",
              "is_repeatable",
              "answer_operations",
              "order",
              "visibility",
              "fields"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "repeatable_groups": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "block_key": {
                "description": "Stable public identifier for the referenced resource.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              "item_operations": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "item_question_keys": {
                "items": {
                  "description": "Stable public identifier for the referenced resource.",
                  "maxLength": 255,
                  "minLength": 1,
                  "type": "string"
                },
                "type": "array"
              },
              "max_items": {
                "anyOf": [
                  {
                    "minimum": 0,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "min_items": {
                "anyOf": [
                  {
                    "minimum": 0,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "parent_block_key": {
                "anyOf": [
                  {
                    "description": "Stable public identifier for the referenced resource.",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Stable public identifier for the referenced resource."
              },
              "section_key": {
                "description": "Stable public identifier for the referenced resource.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "block_key",
              "section_key",
              "parent_block_key",
              "min_items",
              "max_items",
              "item_question_keys",
              "item_operations"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "resource": {
          "additionalProperties": false,
          "properties": {
            "id": {
              "description": "Stable public identifier for the referenced resource.",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "object": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "object"
          ],
          "type": "object"
        },
        "sections": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "label": {
                "type": "string"
              },
              "order": {
                "type": "integer"
              },
              "section_key": {
                "description": "Stable public identifier for the referenced resource.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "section_key",
              "label",
              "order"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "resource",
        "object",
        "contract_version",
        "answers_revision",
        "application_name",
        "description",
        "sections",
        "repeatable_groups",
        "questions"
      ],
      "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"
}
```
