MCPOutils MCP/Emplacements/create_location

create_location

Writelocations:write

Create a new business location under a client. You must provide the client's id (find it with list_clients), 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
clientIdstringobligatoire
The id of the client this location belongs to (required). Find it with list_clients.
namestringobligatoire
The location's business name (required).
countryIsostringobligatoire
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.
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.
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": {
      "clientId": "string",
      "name": "string",
      "countryIso": "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.