Portabase Logo
Portabase DashboardMCP Server

MCP Tools Reference

Complete reference for all tools exposed by the Portabase MCP server.

The Portabase MCP server exposes 58 tools grouped into eight categories: Agents, Databases, Backups, Restorations, Channels, Policies, Organizations and Projects.


Agents

list_agents

List all agents accessible to the authenticated user.

Parameters: none

Returns: Array of agent objects.


get_agent

Get details for a specific agent, including its associated databases.

ParameterTypeRequiredDescription
idstringYesAgent ID

Returns: Agent object with the databases you can access.


create_agent

Create a new agent, optionally scoped to an organization.

ParameterTypeRequiredDescription
namestringYesAgent name
organizationIdstring (UUID)NoOrganization ID to scope the agent to (optional)

Returns: Created agent object.


delete_agent

Delete an agent by ID.

ParameterTypeRequiredDescription
idstringYesAgent ID

Returns: Empty result on success.


get_agent_key

Get the edge key for an agent (used by the agent to authenticate with Portabase).

ParameterTypeRequiredDescription
idstringYesAgent ID

Returns: Edge key string.


list_organization_agents

List the agents attached to an organization.

ParameterTypeRequiredDescription
organizationIdstringYesOrganization ID

Returns: Array of agent objects.


attach_agent_to_organization

Attach a global (system) agent to an organization. Requires system-admin privileges.

ParameterTypeRequiredDescription
organizationIdstringYesOrganization ID
agentIdstringYesAgent ID (must be a global/unattached agent)

Returns: { organizationId, agentId }.


detach_agent_from_organization

Detach an agent from an organization. Also unlinks that org's databases and removes their policies.

ParameterTypeRequiredDescription
organizationIdstringYesOrganization ID
agentIdstringYesAgent ID

Returns: { organizationId, agentId }.


Databases

list_databases

List all databases accessible to the authenticated user.

Parameters: none

Returns: Array of database objects.


create_database

Declare a database on an agent, like Add database on the agent page. The dashboard stores the configuration (secrets encrypted) and the agent receives it at its next ping.

ParameterTypeRequiredDescription
agentIdstringYesAgent ID
projectIdstringNoProject to attach the database to
namestringYesDisplay name
dbmsstringYesEngine: postgresql, postgresql-cluster, mysql, mariadb, mongodb, sqlite, redis, valkey, firebird, mssql, docker-volume or files
configobjectYesConnection settings, with the keys of a databases.json entry (host, port, username, password, database, options...). options.method picks the backup method of files and postgresql-cluster sources and cannot be changed later

Returns: Database object, without its configuration.

Needs system admin rights for a global agent, or the right to manage agents in the agent's organization. Refused with 422 when the agent is too old for dashboard-defined sources (1.19.0), files sources (1.24.0) or the physical method (1.27.0).


get_database

Get details for a specific database.

ParameterTypeRequiredDescription
idstringYesDatabase ID

Returns: Database object, with its own retentionPolicy (or null).


get_database_status

Get the current status of a database, including latest backup and restoration state.

ParameterTypeRequiredDescription
idstringYesDatabase ID

Returns: { isWaitingForBackup, lastContact, latestBackup, latestRestoration }.


attach_database_to_project

Attach a database to a project. The database's agent must belong to the project's organization.

ParameterTypeRequiredDescription
idstringYesDatabase ID
projectIdstringYesTarget project ID

Returns: Updated database object.


detach_database_from_project

Detach a database from its project. Clears its backup schedule and removes its retention, alert and storage policies.

ParameterTypeRequiredDescription
idstringYesDatabase ID

Returns: Updated database object.


Backups

list_backups

List all backups for a specific database, ordered by most recent first.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID

Returns: Array of backup objects.


get_backup

Get details for a specific backup, including its storage locations.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
backupIdstringYesBackup ID

Returns: Backup object with a storages array. Use the id values from storages as backupStorageId in trigger_restore and get_backup_download_url.


trigger_backup

Trigger an immediate backup for a database. Refused if a backup is already waiting or running, or if backups are suspended because databases.json announces a different backup method. For a physical source, full: true takes a full backup that starts a new chain.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
fullbooleanNoPhysical sources only: take a full backup instead of an incremental. Refused with 422 on other sources

Returns: Backup job object.

Returns 409 Conflict if a backup is already waiting or running, or if backups are suspended (databases.json announces a different backup method).


delete_backup

Permanently delete a backup with its files and snapshots; replicas are kept (they are shared mirrors of the source). Cannot be undone.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
backupIdstringYesBackup ID

Returns: Empty result on success.

This cannot be undone.


get_backup_logs

Get the job logs of a backup, oldest first.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
backupIdstringYesBackup ID

Returns: Array of job log entries.


get_backup_download_url

Get a short-lived signed URL (about one minute) to download one stored copy of a backup. Snapshots and replicas cannot be downloaded.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
backupIdstringYesBackup ID
backupStorageIdstringYesBackup storage ID (see get_backup)

Returns: { url }.

The URL expires after about one minute; request a new one if it has expired.


Restorations

trigger_restore

Trigger a database restore from a specific backup storage. Use get_backup to find available backupStorageId values. Refused if a restore is already waiting or running, the backup file is missing, or the backup is a replica.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
backupIdstring (UUID)YesBackup ID
backupStorageIdstring (UUID)YesBackup storage ID (from get_backup storages list)

Returns: Restore job object.

Returns 409 Conflict if a restore is already waiting or running, if the backup file is missing, or if the backup is a sync/copy replica. Snapshots can be restored.


list_restorations

List the restorations of a database, most recent first.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID

Returns: Array of restoration objects.


get_restoration_logs

Get the job logs of a restoration, oldest first.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
restorationIdstringYesRestoration ID

Returns: Array of job log entries.


rerun_restoration

Requeue a finished restoration. Refused while any restoration of the database is waiting or ongoing, or when its backup is no longer available.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
restorationIdstringYesRestoration ID

Returns: Requeued restoration object.


delete_restoration

Permanently delete a restoration record and its logs.

ParameterTypeRequiredDescription
databaseIdstringYesDatabase ID
restorationIdstringYesRestoration ID

Returns: Empty result on success.

This cannot be undone.


Channels

Channel credentials (the config object) are write-only: no tool ever returns them.

list_storage_channels

List storage channels. With organizationId: the organization's own channels and the global ones assigned to it (owned: false). Without: global channels with their organizationIds (instance administrators).

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)

Returns: Array of channel objects, without credentials.


get_storage_channel

Get one storage channel.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID

Returns: Channel object, without credentials.


create_storage_channel

Create a storage channel: owned by the organization when organizationId is given, otherwise global (instance administrators; assign it with set_storage_channel_organizations).

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
namestringYes5–40 characters
providerstringYess3, google-drive, blob, google-cloud-storage, rclone, sftp, local
enabledbooleanNoDefaults to true
configobjectYesProvider settings, validated by the API; stored and never returned

Returns: Created channel object, without credentials.


update_storage_channel

Update a channel. Omitted fields are kept; config, when given, replaces the whole stored config (send every field, secrets included). The provider can't change. A global channel can only be changed without organizationId, by an instance administrator.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID
namestringNoNew name
enabledbooleanNoEnable or disable
configobjectNoComplete new config

Returns: Updated channel object, without credentials.


delete_storage_channel

Permanently delete a storage channel and its storage policies. Local storage channels can't be deleted. If backup copies are recorded on the channel, the call is refused unless force is true.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID
forcebooleanNoAlso delete when backup copies are recorded on the channel

Returns: Empty result on success.

Forcing removes the records of those backup copies from Portabase; the files stay in the storage. This cannot be undone.


test_storage_channel

Check that Portabase can reach a stored storage channel.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID

Returns: { success, message }, with credentials masked in the message.


set_storage_channel_organizations

Set which organizations may use a global storage channel (instance administrators). Replaces the list; removing an organization keeps its storage policies that already use the channel.

ParameterTypeRequiredDescription
channelIdstringYesChannel ID
organizationIdsstring[]YesOrganization IDs; an empty list removes every assignment

Returns: { organizationIds }


list_notification_channels

List notification channels. With organizationId: the organization's own channels and the global ones assigned to it (owned: false). Without: global channels with their organizationIds (instance administrators).

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)

Returns: Array of channel objects, without credentials.


get_notification_channel

Get one notification channel.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID

Returns: Channel object, without credentials.


create_notification_channel

Create a notification channel: owned by the organization when organizationId is given, otherwise global (instance administrators; assign it with set_notification_channel_organizations).

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
namestringYes5–40 characters
providerstringYesslack, smtp, discord, telegram, gotify, ntfy, webhook, nextcloud, teams, pushover, apprise, healthchecks
enabledbooleanNoDefaults to true
configobjectYesProvider settings, validated by the API; stored and never returned

Returns: Created channel object, without credentials.


update_notification_channel

Update a channel. Omitted fields are kept; config, when given, replaces the whole stored config (send every field, secrets included). The provider can't change. A global channel can only be changed without organizationId, by an instance administrator.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID
namestringNoNew name
enabledbooleanNoEnable or disable
configobjectNoComplete new config

Returns: Updated channel object, without credentials.


delete_notification_channel

Permanently delete a notification channel and its alert policies.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID

Returns: Empty result on success.

This cannot be undone.


test_notification_channel

Send a real test notification through a stored notification channel.

ParameterTypeRequiredDescription
organizationIdstringNoOrganization ID for a channel owned by or assigned to that organization; omit for a global channel (instance administrators)
channelIdstringYesChannel ID

Returns: { success, message }, with credentials masked in the message.


set_notification_channel_organizations

Set which organizations may use a global notification channel (instance administrators). Replaces the list; removing an organization keeps its alert policies that already use the channel.

ParameterTypeRequiredDescription
channelIdstringYesChannel ID
organizationIdsstring[]YesOrganization IDs; an empty list removes every assignment

Returns: { organizationIds }


Policies

set_database_backup_policy

Set or clear a database's backup schedule. Provide a cron expression, or an empty string to clear it (which also drops the retention policy).

ParameterTypeRequiredDescription
idstringYesDatabase ID
backupPolicystringYesA valid cron expression, or an empty string to clear the schedule

Returns: Updated database object.


set_project_backup_policy

Set or clear a project's default backup schedule, inherited by its databases that have none. Provide a cron expression, or an empty string to clear it (which also drops the project's retention policy).

ParameterTypeRequiredDescription
idstringYesProject ID
backupPolicystringYesA valid cron expression, or an empty string to clear the schedule

Returns: Updated project object.


set_database_full_backup_policy

Physical sources only: set or clear the full backup schedule. The first backup at or after each occurrence is a full one that starts a new chain; the schedule never starts a backup by itself. While it is set, the agent's full_every_days is not applied.

ParameterTypeRequiredDescription
idstringYesDatabase ID
fullBackupPolicystringYesA 5-field cron expression (minute hour day-of-month month day-of-week), or an empty string to clear the schedule

Returns: Updated database object.


set_database_retention_policy

Create or update a database's own retention policy (overrides the project's). The database must have its own backup schedule.

ParameterTypeRequiredDescription
idstringYesDatabase ID
typestringNocount, days or gfs (default gfs)
countnumberYesBackups kept when type is count (1–100)
daysnumberYesDays kept when type is days (1–3650)
gfsobjectYes{ hourly, daily, weekly, monthly, yearly } copies kept when type is gfs

Returns: Retention policy object.

Returns 409 Conflict if the database has no backup schedule of its own.


set_project_retention_policy

Create or update a project's retention policy, inherited by its databases that have none. The project must have its own backup schedule.

ParameterTypeRequiredDescription
idstringYesProject ID
typestringNocount, days or gfs (default gfs)
countnumberYesBackups kept when type is count (1–100)
daysnumberYesDays kept when type is days (1–3650)
gfsobjectYes{ hourly, daily, weekly, monthly, yearly } copies kept when type is gfs

Returns: Retention policy object.

Returns 409 Conflict if the project has no backup schedule of its own.


get_database_storage_policies

List the database's own storage policies. An empty list makes the database use its project's policies.

ParameterTypeRequiredDescription
idstringYesDatabase ID

Returns: Array of policies with their channel (id, name, provider, enabled).


set_database_storage_policies

Replace all storage policies of a database with the given list. To add or remove one channel, call get_database_storage_policies first and send the edited list. An empty list makes the database use its project's policies. With no enabled storage policy left, backups go to the instance's default storage.

ParameterTypeRequiredDescription
idstringYesDatabase ID
policiesarrayYesComplete list [{ storageChannelId, enabled? }]; every channel must be usable by the organization.

Returns: The new list of policies.


get_database_alert_policies

List the database's own alert policies. An empty list makes the database use its project's policies.

ParameterTypeRequiredDescription
idstringYesDatabase ID

Returns: Array of policies with their channel (id, name, provider, enabled).


set_database_alert_policies

Replace all alert policies of a database with the given list. To add or remove one channel, call get_database_alert_policies first and send the edited list. An empty list makes the database use its project's policies.

ParameterTypeRequiredDescription
idstringYesDatabase ID
policiesarrayYesComplete list [{ notificationChannelId, eventKinds, enabled? }]; every channel must be usable by the organization. Events: error_backup, success_backup, error_health_database, error_backup_missing, success_backup_recovered, error_restore, success_restore.

Returns: The new list of policies.


get_project_storage_policies

List the project's own storage policies.

ParameterTypeRequiredDescription
idstringYesProject ID

Returns: Array of policies with their channel (id, name, provider, enabled).


set_project_storage_policies

Replace all storage policies of a project with the given list. To add or remove one channel, call get_project_storage_policies first and send the edited list. With no enabled storage policy left, backups go to the instance's default storage.

ParameterTypeRequiredDescription
idstringYesProject ID
policiesarrayYesComplete list [{ storageChannelId, enabled? }]; every channel must be usable by the organization.

Returns: The new list of policies.


get_project_alert_policies

List the project's own alert policies.

ParameterTypeRequiredDescription
idstringYesProject ID

Returns: Array of policies with their channel (id, name, provider, enabled).


set_project_alert_policies

Replace all alert policies of a project with the given list. To add or remove one channel, call get_project_alert_policies first and send the edited list.

ParameterTypeRequiredDescription
idstringYesProject ID
policiesarrayYesComplete list [{ notificationChannelId, eventKinds, enabled? }]; every channel must be usable by the organization. Events: error_backup, success_backup, error_health_database, error_backup_missing, success_backup_recovered, error_restore, success_restore.

Returns: The new list of policies.


Organizations

list_organizations

List organizations the authenticated user belongs to.

Parameters: none

Returns: Array of organization objects.


get_organization

Get details for a specific organization.

ParameterTypeRequiredDescription
idstringYesOrganization ID

Returns: Organization object.


create_organization

Create a new organization; the authenticated user becomes its owner.

ParameterTypeRequiredDescription
namestringYesOrganization name
slugstringNoOptional slug (defaults to a slugified name)

Returns: Created organization object.


delete_organization

Delete an organization. Fails if it is the default organization or still has projects.

ParameterTypeRequiredDescription
idstringYesOrganization ID

Returns: { id } of the deleted organization.


Projects

list_projects

List the projects of an organization.

ParameterTypeRequiredDescription
organizationIdstringYesOrganization ID

Returns: Array of project objects.


create_project

Create a new project within an organization.

ParameterTypeRequiredDescription
organizationIdstringYesOrganization ID
namestringYesProject name
slugstringNoOptional slug (defaults to a slugified name)

Returns: Created project object.


get_project

Get details for a specific project.

ParameterTypeRequiredDescription
idstringYesProject ID

Returns: Project object, with its retentionPolicy (or null).


archive_project

Archive a project. Detaches its databases (clearing their schedule) and removes their policies.

ParameterTypeRequiredDescription
idstringYesProject ID

Returns: Archived project object.

Last updated on

On this page