# Turn a PDF or Word brief into a search

> **Casafari is the AI agent-native real estate data intelligence platform.** The most complete property index in Europe: a deduplicated, cleaned property graph of residential and commercial property, for sale and for rent, in 16 countries. Every property is one record with its full price and market history. [How the property graph is built](/docs/property-graph).

**For developers at proptech vendors and chains with written requirement sheets.** Send a PDF, scan or Office file to brief_from_file, show the brief and its quotes for approval, then run search_premises with it.

> How do I read a site brief from a PDF, scan or Word file and search with it?

## What is the problem?

Requirements arrive as PDFs, scans, Word or Excel files; retyping them loses detail, and the search must rest on what the file says, with the user able to check it.

## How does it work, step by step?

1. Send the file to [brief_from_file](https://developers.casafari.com/docs/claro/brief_from_file) as base64 in `content_base64` with its `media_type` and, best, its `filename`, or to `POST /v1/claro/brief/file` ([REST](https://developers.casafari.com/docs/rest/claro/brief-file)) as a multipart upload. Up to 10 MB; accepted: .pdf, .jpg, .jpeg, .png, .webp, .heic, .heif, .txt, .md, .csv, .tsv, .html, .htm, .rtf, .json, .xml, .docx, .xlsx, .pptx, .odt, .ods, .odp.
2. Show the user `brief` (the requirements in plain words) and `requirements`, each with the file's own words as `quote`. `quotes_checked` is true for Office and text files, where a requirement whose quote is not in the text is dropped, and false for PDFs and images.
3. After approval, pass `brief` to [search_premises](https://developers.casafari.com/docs/claro/search_premises) (`POST /v1/claro/search`, [REST](https://developers.casafari.com/docs/rest/claro/search-premises)); the file tool searches nothing itself.
4. Keep `search_id` for [refine_search](https://developers.casafari.com/docs/claro/refine_search) when the user changes the brief.

```http
POST https://platform.casafari.com/mcp/claro
Authorization: Bearer $CASAFARI_API_KEY
Content-Type: application/json

{"jsonrpc": "2.0", "id": "brief", "method": "tools/call", "params": {"name": "brief_from_file", "arguments": {"content_base64": "$FILE_BASE64", "media_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "filename": "perfil.docx"}}}
```

## What do you get?

`brief`, `requirements` with their quotes, and `quotes_checked`; the file is not stored. The search that follows returns exact counts and each criterion's state with its sentence, so every criterion can be traced from the file's quote to the advertisement's sentence.

## What are the limits?

A file above 10 MB is refused: `POST /v1/claro/brief/file` answers 413 with Claro's error body ([errors](https://developers.casafari.com/docs/claro/faq#error-bodies)). For PDFs and images `quotes_checked` is false: have a person check the quotes. REST and MCP differ only in how the file travels, multipart versus base64 ([parity](https://developers.casafari.com/docs/parity#claro-ai)). When a brief and `criteria` are sent together, the criteria override the brief.

## Related use cases

- [Score every premises with your own agent](https://developers.casafari.com/docs/claro/use-cases/score-premises-with-your-own-agent)
- [Load every match into a CRM or warehouse nightly](https://developers.casafari.com/docs/claro/use-cases/nightly-pipeline-into-crm-or-bi)
- [Get location figures for any point in Spain](https://developers.casafari.com/docs/claro/use-cases/explain-any-point-in-spain)
- [Keyword search from a simple form, no model](https://developers.casafari.com/docs/claro/use-cases/keyword-search-from-a-form)
- [Claro AI FAQ](https://developers.casafari.com/docs/claro/faq)
