MCPMCP Tools/Locations/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.

Parameters
clientIdstringrequired
The id of the client this location belongs to (required). Find it with list_clients.
namestringrequired
The location's business name (required).
countryIsostringrequired
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.
streetstringoptional
Street address, line 1.
street1stringoptional
Street address, line 2.
citystringoptional
City.
stateIsostringoptional
State or region, as an ISO code (e.g. "CA").
postalCodestringoptional
Postal or ZIP code.
phonestringoptional
Primary phone number.
additionalPhonesstring[]optional
Any additional phone numbers.
websitestringoptional
The location's website URL.
categoryIdstringoptional
General category id — look it up with list_categories.
categoryNamestringoptional
General category display name (from list_categories). At least this or publisherCategories.google is required — creation fails without some category.
publisherCategoriesobjectoptional
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.
googleobjectoptional
idstringoptional
The publisher's own category id (from list_publisher_categories)
namestringoptional
The category's display name
facebookobjectoptional
idstringoptional
The publisher's own category id (from list_publisher_categories)
namestringoptional
The category's display name
appleobjectoptional
idstringoptional
The publisher's own category id (from list_publisher_categories)
namestringoptional
The category's display name
bingobjectoptional
idstringoptional
The publisher's own category id (from list_publisher_categories)
namestringoptional
The category's display name
additionalCategoriesobject[]optional
Up to 9 extra categories, each an { id?, name }.
idstringoptional
namestringoptional
Category name
descriptionstringoptional
A description of the business.
tagsstring[]optional
Internal tags for your own organization — not shown publicly.
latitudenumberoptional
Latitude. Derived automatically from the address if omitted.
longitudenumberoptional
Longitude. Derived automatically from the address if omitted.
Example request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_location",
    "arguments": {
      "clientId": "string",
      "name": "string",
      "countryIso": "string"
    }
  }
}
Example response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

Response shape shown for illustration — the actual content depends on the tool and your data.