Update a view
update_viewChanges an existing view's code or metadata. Pass expected_revision (the revision get_view showed you) so you never overwrite a change another agent made in the meantime. Prefer edits (exact string replacements, like a find-and-replace; each old_string must match the current source exactly and be unique) for targeted changes such as adding a chart. Use source only for a full rewrite, or restore_revision to roll back. Every call creates a new revision, is test-rendered and reviewed; a revision that fails its render check is NOT published (readers keep the last working one) and your next edits apply to it. The review sends a screenshot and the page's text to OpenAI, unless the workspace turned checks off. When a follow-up request replaces an earlier approach (a better burn figure, a new default), replace the old blocks instead of keeping both: revisions make removal safe. Call get_view first to get the current source. To change only the numbers a view shows, do NOT use this tool: use upsert_rows on the dataset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | New emoji for the page, e.g. "💰". | |
| kind | No | What the page is for. "dashboard": numbers someone watches over time. "tracker": items people work through (steps, tasks, leads) with owners and status. "doc": a brief, report or analysis mostly in prose. "calculator": inputs the reader changes and an answer. Decides what the page review holds it to. | |
| slug | Yes | The view to change: its slug, or its page URL. | |
| cover | No | No longer shown; kept for older clients. | |
| edits | No | Targeted replacements, applied in order. Preferred for most changes. | |
| title | No | New title. Omit to keep the current one. | |
| source | No | Full replacement source. Only for rewrites; do not combine with edits. | |
| questions | No | Replaces the view's questions. Pass it when the user's follow-up changes what the page is for. | |
| collection | No | Moves the view to another collection, which changes who can open it. Only when the user asked. | |
| change_note | Yes | What changed and why, for the revision history. | |
| description | No | New one-sentence description of what the view answers. | |
| dependencies | No | Replaces the full set of extra dependencies. | |
| restore_revision | No | Roll the source back to this revision number. | |
| expected_revision | No | The revision you read with get_view. If someone saved a newer one since, nothing is saved and you are told who; read it again and redo your change on top. |