# prescriptio_ao_track

Ajoute un marche public ou un DCE au pipeline AO (cree un dossier au statut 'A qualifier'). Idempotent : si le marche est deja suivi, renvoie le dossier existant (created:false). Fournir marche_id (uuid) OU annonce_id (reference DCE) — au moins un des deux.

État : implémenté ; distribution : historique uniquement ; offre payante : true ; effets : lecture et écriture possibles.

## Entrée MCP

```json
{
  "properties": {
    "annonce_id": {
      "description": "Reference d'un DCE (annonce_id) — resolue vers le marche lie si possible.",
      "maxLength": 200,
      "type": "string"
    },
    "marche_id": {
      "description": "UUID d'un marche public (marches_publics).",
      "type": "string"
    },
    "title": {
      "description": "Titre du dossier (optionnel — derive du marche si absent).",
      "maxLength": 500,
      "type": "string"
    }
  },
  "type": "object"
}
```

## Sortie MCP

```json
{
  "properties": {
    "action": {
      "type": "string"
    },
    "download_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "fields": {
      "type": "object"
    },
    "files": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "ok": {
      "type": "boolean"
    },
    "page": {
      "type": [
        "integer",
        "null"
      ]
    },
    "pages_total": {
      "type": [
        "integer",
        "null"
      ]
    },
    "quota": {
      "type": "object"
    },
    "texte": {
      "description": "Contenu textuel (pièce de DCE, PV…).",
      "type": "string"
    }
  },
  "type": "object"
}
```

[Contrats externes et limites](/docs/reference/concepts.md).
