Skip to main content
Glama

Automations

notion_automation
Destructive

Manage scheduled or condition-based Notion automation rules that update rows, append content, comment, or trash, with dry-run previews and undo.

Instructions

Manage and run automation rules (rules.json in the local state folder, or NOTION_PLUS_RULES). A rule has a when condition (same where/filter as notion_query, plus relative dates), a schedule ("weekdays 09:00", "daily 18:00", "hourly", cron), or both. Row actions apply to each matching row: {set: {...}}, {append: markdown}, {comment: text}, {trash: true}. then actions run once per firing: {refresh_chart: block_id}, {build_report: {...notion_build_report args}}, {create_page: {parent, title, …}}. Strings accept {{today}}, {{now}}, {{page.}}. A rule must stop matching a row after acting on it (write a value outside its condition, trash, or use marker). Actions: list, get, add, update (merge fields), validate (checks against the live schema and previews), dry_run (never writes), enable, disable, delete, run (writes; one undo_id per rule), history (recent runs, paged), waive (mark a rule's unfinished firing as handled), export / import (the rules file as JSON), deploy (the rules file plus steps to run it on a schedule in GitHub Actions). Each row's actions run in order with progress saved after each step: values that keep the row matching, then content and comments, then the marker or values that take it out of the condition, then trash. A failed row is retried next run from the step that failed, and a scheduled occurrence only counts as fired when all of it succeeded. run reports status succeeded, partial, or failed, and is an error unless every rule succeeded. list and get return the file's revision; pass it as expected_revision on edits so a change made elsewhere in the meantime isn't overwritten.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleNoadd: the whole rule; update: only the fields to change; validate: a rule to check without saving
forceNodry_run/run: ignore schedules and run now
limitNohistory: runs per page.
actionYes
cursorNohistory: next_cursor from the previous page.
rule_idNo
max_rowsNorun: rows acted on across all rules (default 200); the rest wait for the next run.
timezoneNoSet the rules file's time zone (IANA, e.g. America/New_York).
max_blocksNorun: blocks appended (default 5000).
rules_fileNoimport: a whole rules file ({version: 1, timezone, rules: [...]}), e.g. from export.
import_modeNoimport: merge adds or replaces rules by id; replace swaps the whole file.merge
max_minutesNorun: wall time (default 20).
max_requestsNorun: Notion requests (default 3000).
expected_revisionNoEdits: the revision from list/get. The edit is refused if the rules file changed since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only flag destructive/openWorld/non-idempotent; the description adds far more: dry_run never writes, run writes with one undo_id per rule, run errors unless every rule succeeded and reports succeeded/partial/failed, failed rows retry from the failed step, scheduled occurrences only count as fired when fully successful, and expected_revision guards against concurrent overwrites. This is exactly the behavioral depth annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is long, but for a 15-action tool with a nested rule grammar the density is largely earned, and it is front-loaded with the core purpose before descending into rule structure and action semantics. A few clauses (e.g., the step-ordering narrative) could be tightened, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, 14 parameters, nested objects, and destructive actions, the description carries a heavy load and does so: it covers rule grammar, all actions, run status semantics, retry behavior, and revision safety. An agent has enough to select an action and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 86%, so the baseline is 3, but the description meaningfully supplements the near-empty `rule` object by specifying its shape (when/schedule/actions/then, marker requirement, action ordering) and explains confirmed-vs-merge update semantics and the revision/edit contract. It adds real meaning beyond the schema's `additionalProperties: {}` without fully specifying every field's syntax.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Manage and run automation rules') and grounds it in concrete state (rules.json or NOTION_PLUS_RULES), which no sibling covers. It even positions itself relative to siblings by noting the `when` condition reuses notion_query's where/filter and `then` reuses notion_build_report args, making its scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description enumerates every action (list, get, add, update, validate, dry_run, enable, disable, delete, run, history, waive, export/import, deploy) with a short gloss of what each does, which is strong per-action usage context. It stops short of explicit when-to-use-this-vs-a-sibling routing (e.g., vs notion_bulk_update or notion_undo), so it is clear rather than exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.