apply_queue_rule

Apply queue rule

Apply a previously previewed queue rule mutation.

Authorization and permissions

Requires a valid delegated OAuth token and access to the selected workspace.

OAuth scope
mcp:schedule
Workspace requirement
Authorized workspace and current membership required

Permissions and queue revision are rechecked atomically.

Input schema

{
  "additionalProperties": false,
  "properties": {
    "delete": {
      "default": false,
      "description": "Delete.",
      "type": "boolean"
    },
    "policy": {
      "description": "Policy.",
      "enum": [
        "keep",
        "reflow"
      ]
    },
    "preview_token": {
      "description": "Preview token.",
      "maxLength": 10000,
      "minLength": 1,
      "type": "string"
    },
    "ruleId": {
      "description": "Rule id.",
      "minimum": 1,
      "type": [
        "integer",
        "null"
      ]
    },
    "team_id": {
      "description": "Consented workspace ID.",
      "minimum": 1,
      "type": "integer"
    },
    "time": {
      "description": "Time.",
      "pattern": "^[0-2][0-9]:[0-5][0-9]$",
      "type": "string"
    },
    "weekday": {
      "description": "Weekday.",
      "maximum": 6,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "team_id",
    "weekday",
    "time",
    "policy",
    "preview_token"
  ],
  "type": "object"
}

Result schema

{
  "additionalProperties": false,
  "properties": {
    "action": {
      "additionalProperties": false,
      "description": "Action.",
      "properties": {
        "delete": {
          "default": false,
          "description": "Delete.",
          "type": "boolean"
        },
        "kind": {
          "const": "rule",
          "description": "Kind."
        },
        "policy": {
          "description": "Policy.",
          "enum": [
            "keep",
            "reflow"
          ]
        },
        "ruleId": {
          "description": "Rule id.",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "time": {
          "description": "Time.",
          "pattern": "^[0-2][0-9]:[0-5][0-9]$",
          "type": "string"
        },
        "weekday": {
          "description": "Weekday.",
          "maximum": 6,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "weekday",
        "time",
        "policy"
      ],
      "type": "object"
    },
    "changes": {
      "description": "Changes.",
      "items": {
        "additionalProperties": false,
        "description": "Changes item.",
        "properties": {
          "account": {
            "description": "Account.",
            "type": "string"
          },
          "after": {
            "description": "After.",
            "type": [
              "string",
              "null"
            ]
          },
          "before": {
            "description": "Before.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Description.",
            "type": "string"
          },
          "postId": {
            "description": "Post id.",
            "type": "string"
          },
          "queued": {
            "description": "Queued.",
            "type": "boolean"
          }
        },
        "required": [
          "postId",
          "account",
          "description",
          "before",
          "after",
          "queued"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "token": {
      "description": "Token.",
      "type": "string"
    }
  },
  "required": [
    "token",
    "changes",
    "action"
  ],
  "type": "object"
}

Example arguments

{
  "delete": false,
  "policy": "reflow",
  "preview_token": "opaque-token-from-preview",
  "ruleId": null,
  "team_id": 42,
  "time": "09:30",
  "weekday": 2
}

Example result

{
  "action": {
    "delete": false,
    "kind": "rule",
    "policy": "reflow",
    "ruleId": null,
    "time": "09:30",
    "weekday": 2
  },
  "changes": [],
  "token": "opaque-token-from-preview"
}

Errors and retry

The connection is limited to 120 tool calls per user per minute and AI tools to 30 calls per user per hour. Invalid or cross-workspace identifiers return not found; revoked membership/scope returns permission denied; invalid input and stale versions return validation errors. Existing product limits still apply; there is no separate MCP subscription quota.

Do not blindly retry apply. Read the queue first after an uncertain response. Apply rechecks the queue revision and permissions atomically; stale, expired, replayed, or mismatched preview tokens require a new preview. Use the actual token returned by preview, not the illustrative token shown here.

Effects, limits, and source

Workspace roles, subscription and AI usage limits, approval rules, and server rate limits are enforced at call time. Rate-limit responses identify when to retry; scheduled work returns state rather than holding the request open.

social_scheduling.services.team_queue.queue_command

Message on LinkedIn