# Check application draft

`application_definitions.validate_config`

Validate a complete config without saving. Read application_definitions.get_config_schema for the relevant block kinds before authoring. Invalid candidates return findings by path.

[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: read. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "config": {
      "description": "Complete portable configuration. Read application_definitions.get_config_schema for the relevant block kinds before authoring.",
      "type": "object"
    },
    "definition_slug": {
      "anyOf": [
        {
          "description": "Stable public identifier for the referenced resource.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Existing definition whose rules should be used, or null when validating a new definition. Prefix: appdef_."
    },
    "provider_slug": {
      "description": "Provider in whose application-definition context to validate the config. Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "config",
    "provider_slug"
  ],
  "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": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "digest": {
              "description": "SHA-256 fingerprint of the exact document content.",
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            "valid": {
              "const": true
            }
          },
          "required": [
            "valid",
            "digest"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "finding_count": {
              "minimum": 1,
              "type": "integer"
            },
            "findings": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "message": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "path": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "code",
                  "message"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "findings_truncated": {
              "type": "boolean"
            },
            "valid": {
              "const": false
            }
          },
          "required": [
            "valid",
            "findings",
            "finding_count",
            "findings_truncated"
          ],
          "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"
}
```
