Turn a PDF or Word brief into a search
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.
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?
- Send the file to brief_from_file as base64 in
content_base64with itsmedia_typeand, best, itsfilename, or toPOST /v1/claro/brief/file(REST) 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. - Show the user
brief(the requirements in plain words) andrequirements, each with the file's own words asquote.quotes_checkedis true for Office and text files, where a requirement whose quote is not in the text is dropped, and false for PDFs and images. - After approval, pass
briefto search_premises (POST /v1/claro/search, REST); the file tool searches nothing itself. - Keep
search_idfor refine_search when the user changes the brief.
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). 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). When a brief and criteria are sent together, the criteria override the brief.