MCPFerramentas MCP/Localizações/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.

Parâmetros
clientIdstringobrigatório
The id of the client this location belongs to (required). Find it with list_clients.
namestringobrigatório
The location's business name (required).
countryIsostringobrigatório
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.
streetstringopcional
Street address, line 1.
street1stringopcional
Street address, line 2.
citystringopcional
City.
stateIsostringopcional
State or region, as an ISO code (e.g. "CA").
postalCodestringopcional
Postal or ZIP code.
phonestringopcional
Primary phone number.
additionalPhonesstring[]opcional
Any additional phone numbers.
websitestringopcional
The location's website URL.
categoryIdstringopcional
General category id — look it up with list_categories.
categoryNamestringopcional
General category display name (from list_categories). At least this or publisherCategories.google is required — creation fails without some category.
publisherCategoriesobjectopcional
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.
googleobjectopcional
idstringopcional
The publisher's own category id (from list_publisher_categories)
namestringopcional
The category's display name
facebookobjectopcional
idstringopcional
The publisher's own category id (from list_publisher_categories)
namestringopcional
The category's display name
appleobjectopcional
idstringopcional
The publisher's own category id (from list_publisher_categories)
namestringopcional
The category's display name
bingobjectopcional
idstringopcional
The publisher's own category id (from list_publisher_categories)
namestringopcional
The category's display name
additionalCategoriesobject[]opcional
Up to 9 extra categories, each an { id?, name }.
idstringopcional
namestringopcional
Category name
descriptionstringopcional
A description of the business.
tagsstring[]opcional
Internal tags for your own organization — not shown publicly.
latitudenumberopcional
Latitude. Derived automatically from the address if omitted.
longitudenumberopcional
Longitude. Derived automatically from the address if omitted.
Exemplo de solicitação
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_location",
    "arguments": {
      "clientId": "string",
      "name": "string",
      "countryIso": "string"
    }
  }
}
Exemplo de resposta
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

O formato da resposta é ilustrativo — o conteúdo real depende da ferramenta e dos seus dados.