Views, Sharing, and Report Tools
Use these tools to create reusable filtered Views, share records and forms, and build saved reports.
Views
| Tool | What it does |
|---|---|
anydb_list_views | Lists accessible Views with decoded scope, target types, and filters. |
anydb_create_view | Creates a filtered workspace View or direct-child View. |
anydb_update_view | Renames a View or replaces its complete targets and filters. |
anydb_delete_view | Permanently deletes a confirmed View. |
Call anydb_list_views before creating a View to avoid duplicates. A workspace View is attached to the workspace root; a children View is attached to a specific parent and filters its direct children.
The named filters shown as tabs on a type's listing page are a separate feature. MCP View tools do not read or write those tabs. A created View can be queried by passing its viewId as parentid to list_records and is available from the workspace's saved Views.
Sharing
| Tool | What it does |
|---|---|
anydb_list_team_groups | Lists stable group names that can receive private shares. |
anydb_list_shares | Lists accessible record and form share facets. |
anydb_get_share | Gets one share facet by shareId and kind, including who it is shared with, its link, its expiry and, for forms, its child forms and settings. |
anydb_create_share | Creates a public or private record or form share, optionally with an expiry, and for forms child forms and submission settings. |
anydb_update_share | Changes an existing share without recreating it: name, expiry, public link, people, and role or form settings. |
anydb_revoke_share | Revokes one record or form share facet while preserving any other facet on the same share. |
Call anydb_list_shares before creating a share so existing compatible public links can be reused. Private shares accept email addresses or stable group names returned by anydb_list_team_groups; do not guess internal group IDs.
Record shares can use viewer or editor access and optionally include attachments. Form shares target a stable type name and can identify the parent that receives submissions.
Every share, public or private, returns a url: the link to give people. A public share gets its /s/ (record) or /f/ (form) link, a private record share the "Shared with me" page for the people it is shared with, and a form its /f/ link.
Expiry, child forms and form settings
When creating a share:
expiresAt(YYYY-MM-DD, today or later) sets a date after which the share stops working.- For forms,
childFormslists child types the submitter fills in together with the form, for example[{ "templateName": "Photo", "min": 1, "max": 4 }](mindefaults to 0 andmaxto 1). - For forms,
submissionGrouping(NONE,DAY,WEEK,MONTHorYEAR) files submissions into a folder per period, andsubmissionNotificationsturns the email to the sharer on each submission on or off.
Changing a share
Use anydb_update_share with the shareId, its kind and a changes object. Only what changes names is changed.
| Change | How |
|---|---|
| Rename | name |
| Set or remove the expiry | expiresAt with a date, or null to remove it |
| Public link on or off | privacy: public turns it on; private turns it off and keeps the named people |
| Add people | addRecipients with emails and/or groupNames |
| Remove people | removeRecipients with the emails they were shared with and/or groupNames |
| Record share: access level | role (viewer or editor) and withAttachments, applied to everyone on the share |
| Form share: child forms and settings | childForms (replaces the list; [] removes them), submissionGrouping, submissionNotifications |
Only people newly added are emailed. Removing the last person from a record share deletes it, and the response says so with deleted: true. Adding a person to an existing form share works even when the team is at its form-share limit. Each plan allows a number of form shares; at the limit a new form share is refused with a message that names the limit.
Who can do what
Every sharing tool runs as the authenticated user and applies the same access rules as the Share dialog:
- Creating, changing or deleting a share needs permission to share the record (for a form, its parent record). A tool never does more than that user could in the dialog.
- Only the person who created a record share can change its settings or add people to it.
- Anyone who can read what a share shares can read the share, but only the person who created it and people who may share the record see who else it is shared with; for everyone else
recipientsis empty andrecipientsHiddenistrue. - A refusal says why: not authorized, not found, or the plan limit.
Workflow scripts can manage shares as well, with createFormShare, updateFormShare, deleteFormShare, getShare and the record-share functions; see AnyDB Scripting.
Reports
| Tool | What it does |
|---|---|
anydb_list_reports | Lists saved reports in a workspace with their IDs and names. |
anydb_get_report | Gets one report's complete definition. |
anydb_create_report | Validates or creates a saved grouped and aggregated report over one type. |
anydb_update_report | Renames a report, replaces its complete definition, or validates a proposed update. |
anydb_delete_report | Permanently deletes a saved report and every snapshot computed for it. |
anydb_run_report | Runs a saved report, like the Run button in the Reports tab. |
anydb_get_report_result | Reads the last computed result without re-running the report. |
anydb_export_report | Exports the last ready snapshot as CSV text or an XLSX workbook. |
anydb_email_report | Emails a report's CSV or XLSX export to people by email address. |
Call anydb_list_reports before creating a report to avoid duplicates. Report definitions support:
- A stable
templateName - Field and date-bucket grouping by day, week, month, quarter, or year
- Selected output fields
sum,avg,min,max, andcountmetrics- Filter expressions
- Subtotals and grand totals
- Candidate-record, group, and cell-document limits
- IANA time zones for date boundaries
Use validateOnly: true to check a report definition without saving. Sending definition to anydb_update_report replaces the complete definition, so include every setting that must remain.
Run, read, export, and email a report
A report is computed by a background job, and running it replaces the report's previous snapshot.
- Call
anydb_run_report. The answer carries ajobIdand a status ofqueued,running,ready, orfailed. PasswaitSeconds(up to 60) to wait for the snapshot and receive the result in the same answer. - Otherwise poll
anydb_get_report_resultuntilmanifest.statusisready. The manifest carriestotalGroups,totalMatchedRecords,isTruncated, andgrandTotal. PassgroupIndexwithstartandlimitto page one group's detail rows, orskipDetailsto leave them out. - Call
anydb_export_reportwith aformatofcsvorxlsx. It is refused until a snapshot is ready. - Call
anydb_email_reportto send the export to 1 to 25 email addresses.
anydb_email_report is not a general email tool. The only thing it can send is the export of a report the caller can read, with a fixed AnyDB message that names the caller as the sender. The optional note is the only free text and is shown as plain text. It needs a Business or Enterprise plan, counts against the team's daily email limit, and always reports a refused or over-limit send. It sends the last ready snapshot. Set refresh: true to run the report first: it waits up to 60 seconds and sends nothing if the new snapshot is not ready. Exports over 5 MB are refused, so use CSV or narrow the report.