pubsub_publish
Publish a message to a Pub/Sub emulator topic to trigger subscribed functions, passing string data, JSON payload text, and attributes.
Instructions
Publish one message to a Pub/Sub emulator topic: string data as given, other JSON as its text (base64-encoded on the wire), plus attributes; the functions subscribed to it run. To read a subscription's backlog without consuming it, use pubsub_peek; to run a scheduled function, schedules_run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>"
},
"name": "pubsub_publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Message data | |
| topic | Yes | Topic name (or projects/<p>/topics/<name>) | |
| attributes | No | String attributes | |
| orderingKey | No | Ordering key |