MCP Tools Reference: pubsub.googleapis.com

Tool: delete_subscription

Delete an existing Cloud Pub/Sub subscription.

Parameters

  • subscription: The name of the subscription to delete in the format projects/{project_id}/subscriptions/{name}.

Returns

  • google.protobuf.Empty if the subscription exists.

  • A NOT_FOUND error if the subscription does not exist.

Important Notes

  • A subscription is a named resource that represents a stream of messages from a single, specific topic, to be delivered to the subscribing application.

  • A project ID and subscription name must be provided.

  • All messages retained in the subscription are immediately dropped.

  • Calls to Pull after deletion will return NOT_FOUND.

The following sample demonstrate how to use curl to invoke the delete_subscription MCP tool.

Curl Request
                  
curl --location 'https://pubsub.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "delete_subscription",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Request for the DeleteSubscription method.

DeleteSubscriptionRequest

JSON representation
{
  "subscription": string
}
Fields
subscription

string

Required. The subscription to delete. Format is projects/{project}/subscriptions/{sub}.

Output Schema

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:

service Foo {
  rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}

Tool Annotations

Destructive Hint: ✅ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ✅