{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Patch Worker script-level settings when using [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions). Including but not limited to Logpush and Tail Consumers.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/workers_identifier"},"script_name":{"$ref":"#/definitions/workers_script_name"}},"required":["account_id","script_name"],"additionalProperties":false},"body":{"$ref":"#/definitions/workers_script-settings-item"}},"required":["path","body"],"additionalProperties":false,"definitions":{"workers_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"workers_script_name":{"description":"Name of the script.","type":"string","pattern":"^[a-z0-9_][a-z0-9-_]*$","examples":["this-is_my_script-01"]},"workers_script-settings-item":{"type":"object","properties":{"logpush":{"$ref":"#/definitions/workers_logpush"},"observability":{"allOf":[{"$ref":"#/definitions/workers_observability-2"},{"type":["object","null"]}]},"tags":{"allOf":[{"$ref":"#/definitions/workers_tags"},{"items":{"$ref":"#/definitions/workers_tag"},"type":["array","null"]}]},"tail_consumers":{"description":"List of Workers that will consume logs from the attached Worker.","type":["array","null"],"items":{"$ref":"#/definitions/workers_tail_consumers_script"}}}},"workers_logpush":{"description":"Whether Logpush is turned on for the Worker.","type":"boolean","default":false,"examples":[false]},"workers_observability-2":{"description":"Observability settings for the Worker.","type":"object","properties":{"enabled":{"description":"Whether observability is enabled for the Worker.","type":"boolean","examples":[true]},"head_sampling_rate":{"description":"The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.","type":["number","null"],"examples":[0.1]},"issues":{"description":"Real-time Issues settings for the Worker.","type":["object","null"],"properties":{"enabled":{"description":"Whether real-time Issues are enabled for the Worker.","type":"boolean","examples":[true]}}},"logs":{"description":"Log settings for the Worker.","type":["object","null"],"properties":{"destinations":{"description":"A list of destinations where logs will be exported to.","type":"array","items":{"type":"string"},"examples":[["cloudflare"]]},"enabled":{"description":"Whether logs are enabled for the Worker.","type":"boolean","examples":[true]},"head_sampling_rate":{"description":"The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.","type":["number","null"],"examples":[0.1]},"invocation_logs":{"description":"Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker.","type":"boolean","examples":[true]},"persist":{"description":"Whether log persistence is enabled for the Worker.","type":"boolean","default":true,"examples":[true]}},"required":["enabled","invocation_logs"]},"redact_query_string":{"description":"Whether query strings are removed from request URLs in logs and traces.","type":"boolean","default":false,"examples":[false]},"traces":{"description":"Trace settings for the Worker.","type":["object","null"],"properties":{"destinations":{"description":"A list of destinations where traces will be exported to.","type":"array","items":{"type":"string"},"examples":[["cloudflare"]]},"enabled":{"description":"Whether traces are enabled for the Worker.","type":"boolean","examples":[true]},"head_sampling_rate":{"description":"The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.","type":["number","null"],"examples":[0.1]},"persist":{"description":"Whether trace persistence is enabled for the Worker.","type":"boolean","default":true,"examples":[true]},"propagation_policy":{"description":"Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. \"authenticated\" honors inbound trace context only when accompanied by a valid trace auth token. \"accept\" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. Returns null when the trace propagation feature is not enabled for the account.","type":["string","null"],"enum":["authenticated","accept",null]}}}},"required":["enabled"]},"workers_tags":{"description":"Tags associated with the Worker.","type":["array","null"],"items":{"$ref":"#/definitions/workers_tag"},"maxItems":10,"examples":[["my-team","my-public-api"]]},"workers_tag":{"type":"string","maxLength":1024,"pattern":"^[^,&]*$","examples":["my-tag"]},"workers_tail_consumers_script":{"description":"A reference to a script that will consume logs from the attached Worker.","type":"object","properties":{"environment":{"description":"Optional environment if the Worker utilizes one.","type":"string","examples":["production"]},"namespace":{"description":"Optional dispatch namespace the script belongs to.","type":"string","examples":["my-namespace"]},"service":{"description":"Name of Worker that is to be the consumer.","type":"string","examples":["my-log-consumer"]}},"required":["service"]}}},"name":"Patch Worker Script Settings","id":"cloudflare.worker-script-settings-patch-settings","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353","script_name":"this-is_my_script-01"},"body":{}},"maxRequests":1,"summary":false}}