Skip to main content
Glama

À proximité

Prepare a request for review

prepare_referral_request
Read-only

Validate 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

NameRequiredDescriptionDefault
modeNoone_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.
nameYes
phoneYes
sinceNoSince 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.
localeYesThe customer's language: fr for French, en for English. Use it for the review and the text messages they receive.
answersNoAnswers 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.
companyNoOnly 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.
serviceNo
urgencyNoUrgent 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.
servicesNoONLY 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.
situationNoThe 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.
postalCodeNo
addressUnitNo
descriptionNoThe 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.
addressLine1YesCustomer-stated street address for this job. Required for a ready review. Manual entry is valid; never guess from a suggestion.
municipalityYesCustomer-stated property location, required on every preparation. Ask the customer if unknown.
sameCompanyAsLastTimeNotrue 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare a non-destructive, read-only call, and the description adds real behavior beyond them: 'Nothing is sent', the return contains the request text, consent notice and a review token, and a correction loop keyed on fieldsToCorrect. That last detail is especially valuable because there is no output schema, though it does not say what other error or partial-validation shapes look like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and 'Nothing is sent' before any parameter guidance, and every sentence carries operational content. The services sentence is heavily packed with stacked clauses, which hurts readability for such an important behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter tool with nested objects and no output schema, the description covers the essentials: no submission, review token, correction loop, multi-trade structuring, and the photo limitation. It leaves the exact shape of a failed validation response and the follow-up submit step implicit, which keeps it just under fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 71%, and the description compensates where the schema is weakest: it explains the multi-trade rule for services (two or more trades, one entry per trade, only that trade's part of the description, top-level description/service/situation/since/answers then omitted) and ties situation and answers to get_referral_options' data. It does not add much on mode, urgency, company or sameCompanyAsLastTime beyond existing schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb chain and outcome: validate details, return the exact request plus consent notice and a review token, and explicitly that nothing is sent. That last clause cleanly separates it from submit_referral_request without the agent needing to open the sibling schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete when-to guidance: use get_referral_options' situations for the situation, take since/answers from the customer's words, pass municipality from the stated job location, call again when fieldsToCorrect is not empty, and route photos to aproximite.ca. It never explicitly says what to do with the returned token (i.e. that submit_referral_request comes after the customer approves), so the handoff is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources