MCPOutils MCP/Emplacements/create_location

create_location

Writelocations:write

Create a new business location — or, with kind="website", a website entity — under a client or on its own. Pass the client's id (find it with list_clients) to add it to that client, or omit clientId to add it without a client. You must provide the location's business name, its two-letter country code (ISO-3166-1 alpha-2), and SOME category — creation fails without one, even though the schema can't mark it required (pass at least categoryName, from list_categories, or publisherCategories.google, from list_publisher_categories). Everything else — address, phone, website, description — is optional but makes for a better listing. Categories come in two kinds: one general category (look it up with list_categories) and per-publisher categories for Google, Facebook, Apple, and Bing (look them up with list_publisher_categories); resolve those first and pass their ids. Once created, the location is automatically queued for submission to online directories and listings. If latitude/longitude are omitted they're derived from the address. Returns the new location's id. You don't pass an agency — it comes from your credentials.

Paramètres
clientIdstringfacultatif
The id of the client this location belongs to (find it with list_clients). Omit to add the location without a client. Accepts the database ID or public cli- ID. IDs must belong to the authenticated agency and permitted client.
kind"location" | "website"facultatif
"location" (default) is a physical business listing. "website" is a website entity — a brand's site tracked for reviews, SEO, AEO and social — created from a name and `website` URL alone: no address, category or country is needed, it isn't a billable location, and it is only available to workspaces with website entities enabled.
namestringobligatoire
The location's business name (required).
countryIsostringfacultatif
The location's country as a two-letter ISO-3166-1 alpha-2 code, e.g. "US" or "GB" (required). Determines which directories the location can be listed in.
streetstringfacultatif
Street address, line 1.
street1stringfacultatif
Street address, line 2.
citystringfacultatif
City.
stateIsostringfacultatif
State or region, as an ISO code (e.g. "CA").
postalCodestringfacultatif
Postal or ZIP code.
serviceAreaobjectfacultatif
Service-area settings — for a business that serves customers at their location. businessType CUSTOMER_LOCATION_ONLY hides the street address on Google (a pure service-area business; the street is never sent there); CUSTOMER_AND_BUSINESS_LOCATION shows the address plus the areas served. places is up to 20 areas, each { name, placeId? }; Google only accepts places with their Google Place ID, so pass placeId for every place you want on Google.
businessType"CUSTOMER_LOCATION_ONLY" | "CUSTOMER_AND_BUSINESS_LOCATION"facultatif
Service-area type.
placesobject[]facultatif
Areas served (max 20).
namestringfacultatif
Place name, e.g. "Austin, TX, USA".
placeIdstringfacultatif
Google Place ID of the area.
publisherServiceAreasobjectfacultatif
A different service area per publisher, stored as that publisher's own value; a publisher left out uses serviceArea. Each key is a serviceArea object (same shape).
googleobjectfacultatif
Service-area settings — for a business that serves customers at their location. businessType CUSTOMER_LOCATION_ONLY hides the street address on Google (a pure service-area business; the street is never sent there); CUSTOMER_AND_BUSINESS_LOCATION shows the address plus the areas served. places is up to 20 areas, each { name, placeId? }; Google only accepts places with their Google Place ID, so pass placeId for every place you want on Google.
businessType"CUSTOMER_LOCATION_ONLY" | "CUSTOMER_AND_BUSINESS_LOCATION"facultatif
Service-area type.
placesobject[]facultatif
Areas served (max 20).
namestringfacultatif
Place name, e.g. "Austin, TX, USA".
placeIdstringfacultatif
Google Place ID of the area.
facebookobjectfacultatif
Service-area settings — for a business that serves customers at their location. businessType CUSTOMER_LOCATION_ONLY hides the street address on Google (a pure service-area business; the street is never sent there); CUSTOMER_AND_BUSINESS_LOCATION shows the address plus the areas served. places is up to 20 areas, each { name, placeId? }; Google only accepts places with their Google Place ID, so pass placeId for every place you want on Google.
businessType"CUSTOMER_LOCATION_ONLY" | "CUSTOMER_AND_BUSINESS_LOCATION"facultatif
Service-area type.
placesobject[]facultatif
Areas served (max 20).
namestringfacultatif
Place name, e.g. "Austin, TX, USA".
placeIdstringfacultatif
Google Place ID of the area.
appleobjectfacultatif
Service-area settings — for a business that serves customers at their location. businessType CUSTOMER_LOCATION_ONLY hides the street address on Google (a pure service-area business; the street is never sent there); CUSTOMER_AND_BUSINESS_LOCATION shows the address plus the areas served. places is up to 20 areas, each { name, placeId? }; Google only accepts places with their Google Place ID, so pass placeId for every place you want on Google.
businessType"CUSTOMER_LOCATION_ONLY" | "CUSTOMER_AND_BUSINESS_LOCATION"facultatif
Service-area type.
placesobject[]facultatif
Areas served (max 20).
namestringfacultatif
Place name, e.g. "Austin, TX, USA".
placeIdstringfacultatif
Google Place ID of the area.
bingobjectfacultatif
Service-area settings — for a business that serves customers at their location. businessType CUSTOMER_LOCATION_ONLY hides the street address on Google (a pure service-area business; the street is never sent there); CUSTOMER_AND_BUSINESS_LOCATION shows the address plus the areas served. places is up to 20 areas, each { name, placeId? }; Google only accepts places with their Google Place ID, so pass placeId for every place you want on Google.
businessType"CUSTOMER_LOCATION_ONLY" | "CUSTOMER_AND_BUSINESS_LOCATION"facultatif
Service-area type.
placesobject[]facultatif
Areas served (max 20).
namestringfacultatif
Place name, e.g. "Austin, TX, USA".
placeIdstringfacultatif
Google Place ID of the area.
socialLinksobjectfacultatif
Social profile URLs. Only the keys you pass change; pass null for a key to clear it. Published to Google as url_* attributes and to Bing/Apple's social fields — don't send those as attributes.
facebookfacultatif
Facebook page URL.
instagramfacultatif
Instagram URL.
twitterfacultatif
X/Twitter URL.
linkedinfacultatif
LinkedIn URL.
youtubefacultatif
YouTube URL.
tiktokfacultatif
TikTok URL.
pinterestfacultatif
Pinterest URL.
paymentMethodsstring[]facultatif
Payment methods accepted, e.g. "Visa", "American Express", "Cash only" (replaces the existing list; [] clears it). Published to Google as pay_* attributes, and to Apple and Bing.
phonestringfacultatif
Primary phone number.
additionalPhonesstring[]facultatif
Any additional phone numbers.
websitestringfacultatif
The location's website URL.
categoryIdstringfacultatif
General category id — look it up with list_categories.
categoryNamestringfacultatif
General category display name (from list_categories). At least this or publisherCategories.google is required — creation fails without some category.
publisherCategoriesobjectfacultatif
Per-publisher categories, one per publisher. Each is an { id, name } looked up with list_publisher_categories. At least publisherCategories.google or categoryName is required — creation fails without some category.
googleobjectfacultatif
idstringfacultatif
The publisher's own category id (from list_publisher_categories)
namestringfacultatif
The category's display name
facebookobjectfacultatif
idstringfacultatif
The publisher's own category id (from list_publisher_categories)
namestringfacultatif
The category's display name
appleobjectfacultatif
idstringfacultatif
The publisher's own category id (from list_publisher_categories)
namestringfacultatif
The category's display name
bingobjectfacultatif
idstringfacultatif
The publisher's own category id (from list_publisher_categories)
namestringfacultatif
The category's display name
additionalCategoriesobject[]facultatif
Up to 9 extra categories, each an { id?, name }.
idstringfacultatif
namestringfacultatif
Category name
descriptionstringfacultatif
A description of the business.
tagsstring[]facultatif
Internal tags for your own organization — not shown publicly.
customFieldsobjectfacultatif
Values for the agency's custom location fields, as { fieldKey: value } (keys from list_custom_field_definitions; values are validated against each field's type). Same shape set_custom_field_value takes one at a time.
latitudenumberfacultatif
Latitude. Derived automatically from the address if omitted.
longitudenumberfacultatif
Longitude. Derived automatically from the address if omitted.
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_location",
    "arguments": {
      "name": "string"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.