Prepare a request for review
prepare_referral_requestValidate the customer's details and return the exact request and consent notice to show them, with a review token. Nothing is sent. Work from two or more trades goes in services, one entry per trade with only that trade's part of the description, in this one call: never one description for several trades. Pass the situation, since and answers from the customer's words and get_referral_options' situations. Municipality must be the customer's stated job location; ask if unknown. Call again with corrected details if fieldsToCorrect is not empty. Photos are not supported here; the customer can add them on aproximite.ca.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"locale": "<locale>",
"addressLine1": "<addressLine1>",
"municipality": "<municipality>",
"name": "<name>",
"phone": "<phone>"
},
"name": "prepare_referral_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | one_company (default): one local company calls the customer. quotes: several local companies call about the same request so the customer can compare quotes and choose. Use quotes only when the customer says they want to compare quotes; never promise a number of companies or a delay. | |
| name | Yes | ||
| phone | Yes | ||
| since | No | Since when the problem has been going on: today, days (a few days), week_plus (more than a week) or unknown. Only for a problem situation, never for an installation. | |
| locale | Yes | The customer's language: fr for French, en for English. Use it for the review and the text messages they receive. | |
| answers | No | Answers to the situation's questions, question id to choice id, from what the customer said. Only that situation's questions and choices; leave out a question they can't answer. Later answers add to earlier ones. | |
| company | No | Only when the customer came from a company's page on this site (/fr/entreprises/{company} or /companies/{company}): that page's last path segment. The request goes to that company first when it can take it, otherwise as usual. An empty string removes it. Never guess one. | |
| service | No | ||
| urgency | No | Urgent only when the customer says today, tomorrow, urgent or an emergency, as the website's Urgent choice. Wanting it soon or fast is flexible (default), with no follow-up question. this_week is still accepted. Ask only if the customer hasn't said; never promise a response time. | |
| services | No | ONLY when the customer describes work for two or more trades (for example after moving in: an electrical panel, painting and a cleaning): one entry per trade, never two for the same trade. Each entry has its service or situation, ONLY that trade's part of the description in the customer's words (with what they said about the house or the dates), and that situation's since and answers. Then leave out the top-level description, service, situation, since and answers; the address, name, phone, urgency and mode go with every entry. The customer sees one review and approves once; one submit sends one request per trade, and each company sees only its own entry. | |
| situation | No | The situation from get_referral_options' situations that matches the job, confirmed with the customer. The service then follows the situation. An empty string removes it. | |
| postalCode | No | ||
| addressUnit | No | ||
| description | No | The job as the customer would tell the company, in the first person and in their words, keeping every detail they gave about it (age, model, where, what happens). Only one trade's work: another trade's work is another request (or another entry in services, where offered). Don't add the urgency, the quotes choice or the situation's answers: they go with the request already. A trade name alone is too short: at least three words about the job. | |
| addressLine1 | Yes | Customer-stated street address for this job. Required for a ready review. Manual entry is valid; never guess from a suggestion. | |
| municipality | Yes | Customer-stated property location, required on every preparation. Ask the customer if unknown. | |
| sameCompanyAsLastTime | No | true only when the customer says they want the same company as for a previous job ("the same electrician as last time"). Never ask about it. |