# Update

Launch stage: Beta

`PATCH /api/2.1/unity-catalog/{mcp_service.name=mcp-services/*}`

Updates an MCP service. Only the fields named in `update_mask` are
 changed; the resource name is immutable. Optionally supply an `etag` to
 make the update conditional on the MCP service not having changed since it
 was read.

 You must be the owner of the MCP service or have `MANAGE` on it, plus
 `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent schema.

API scopes: unity-catalog

## Path parameters

- `mcp_service` (object, optional)
  The MCP service with the updated field values. `name` identifies the
   resource (`mcp-services/{catalog}.{schema}.{mcp_service}`); only fields
   listed in `update_mask` are applied.
  - `name` (string, optional)
    Resource name of the MCP service.
     Format: `mcp-services/{catalog}.{schema}.{mcp_service}`.
     Each `{...}` component is capped at 255 characters individually.
      Server-derived on Create from `parent` +
     `mcp_service_id`; required and immutable on Update/Get/Delete.
  - `owner` (string, optional)
    The owner of the MCP service. Write-only; read owner via effective_owner.
  - `effective_owner` (string, optional)
    The resolved owner of the MCP service. Falls back to the caller's identity
     when `owner` is not explicitly set on creation.
  - `metastore_id` (string, optional)
    Metastore hosting the MCP service.
  - `create_time` (string, optional)
    When the MCP service was created.
  - `created_by` (string, optional)
    Creator identity.
  - `update_time` (string, optional)
    When the MCP service was last modified.
  - `updated_by` (string, optional)
    Identity of the last updater.
  - `comment` (string, optional)
    User-provided description.
    Constraints: `<= 65536 characters`
  - `config` (object, optional)
    Operational configuration: connection, tool selectors, rate limit.
     Required on CreateMcpService; on
     UpdateMcpService it is required only when `config` (or a `config.*`
     subpath) appears in `update_mask`.
    - `source_connection` (object, required)
      UC Connection referencing the MCP server.
      - `name` (string, optional)
        Name of the UC connection that hosts the MCP server, as
         `connections/{catalog}.{schema}.{connection}`.
      - `is_deleted` (boolean, optional)
    - `include_tool_selectors` (array of string, optional)
      Glob or exact-match patterns selecting which tools from the MCP server
       to expose. Prefix match for patterns with `*`, exact match otherwise.
       An empty list means all tools are included. Per-element max 256 chars.
    - `rate_limits` (array of object, optional)
      Per-principal rate limits applied to tool invocations routed through this
       MCP service. Repeated to support per-USER / USER_GROUP / SERVICE_PRINCIPAL
       / SERVICE / USER_DEFAULT scopes simultaneously, mirroring the
       `ModelServiceConfig.rate_limits` shape. Empty when no rate limit is
       configured.
      - `key` (string, optional)
        Scope key. Determines whether `principal` is required.
        Possible values: `RATE_LIMIT_KEY_USER`, `RATE_LIMIT_KEY_USER_GROUP`, `RATE_LIMIT_KEY_SERVICE_PRINCIPAL`, `RATE_LIMIT_KEY_SERVICE`, `RATE_LIMIT_KEY_USER_DEFAULT`, `RATE_LIMIT_KEY_REQUEST_TAG`
      - `renewal_period` (string, optional)
        Renewal period.
        Possible values: `RATE_LIMIT_RENEWAL_PERIOD_MINUTE`, `RATE_LIMIT_RENEWAL_PERIOD_HOUR`
      - `principal` (string, optional)
        Principal this limit applies to: user email, group name, or service
         principal application ID. Required unless `key` is
         `RATE_LIMIT_KEY_SERVICE`, `RATE_LIMIT_KEY_USER_DEFAULT`, or
         `RATE_LIMIT_KEY_REQUEST_TAG` (which must not set a principal).
      - `requests` (int64, optional)
        Max requests allowed within a renewal period. Leave unset for no request limit.
      - `tokens` (int64, optional)
        Max tokens allowed within a renewal period. Leave unset for no token limit.
      - `request_tag_key` (string, optional)
        Request tag key this limit applies to. Required when `key` is
         `RATE_LIMIT_KEY_REQUEST_TAG`, forbidden otherwise.
      - `request_tag_value` (string, optional)
        Request tag value this limit applies to. Only valid when `key` is
         `RATE_LIMIT_KEY_REQUEST_TAG`. Leave unset to apply the limit to every
         value of `request_tag_key` (an any-value default); a set value is a
         specific override for that value.
  - `etag` (string, optional)
    Optimistic concurrency control token. Server-generated from the
     entity's state and returned on every read. To use it as an if-match
     precondition on a mutation, echo the last-read value back via the dedicated
     `etag` field on the Update / Delete request; the server rejects the mutation
     if the stored etag differs.

## Query parameters

- `update_mask` (string, optional)
  The list of fields to update. The framework validates each path against
   the `mcp_service` field above. Wildcard paths (`paths: ["*"]`) are not
   supported; list each field path explicitly.
- `etag` (string, optional)
  If-match precondition: when set, the update proceeds only if the
   current server-side etag matches. Empty means an unconditional update.

## Returns

Returns the McpService object.

## Response

```json
{
  "name": "string",
  "owner": "string",
  "effective_owner": "string",
  "metastore_id": "string",
  "create_time": "string",
  "created_by": "string",
  "update_time": "string",
  "updated_by": "string",
  "comment": "string",
  "config": {
    "source_connection": {},
    "include_tool_selectors": [
      "string"
    ],
    "rate_limits": [
      {}
    ]
  },
  "etag": "string"
}
```

