Skip to Content
PyoDocs

Tools

Everything an AI assistant can do through Pyo's MCP server.

Pyo's MCP server has 132 tools. They act as the person who approved the assistant, with the same permission checks as the dashboard.

An assistant only sees the tools its access allows: 30 with Read only, 39 with Deploy and all 132 with Full. See access.

Most tools do the same as an API operation, and take the same fields. Its reference page lists them.

Common tools

Start with these. They cover what most conversations need.

ToolWhat it doesInputsAccessAPI
list_teamsTeams the user belongs to.NoneReadReference
list_servicesServices of a team: status, replicas, domains, live deployment.teamReadReference
get_serviceOne service in detail: source, settings, domains, resources, runtime, recent deployments.service_id (required)ReadReference
list_deploymentsA service's deployments, newest first.service_id (required), limitReadReference
get_deploymentA deployment's status, why it failed, and its build and rollout logs.deployment_id (required)ReadReference
get_service_logsRecent output of the service's running replicas.service_id (required)ReadReference
list_serversClusters and servers of a team, with CPU and memory.teamReadReference
deploy_serviceDeploy the service with its current settings (Git services build their branch head), or retry a failed deployment. Returns the deployment id.service_id (required), retry_ofDeployReference
rollback_serviceGo back to an earlier successful deployment (the previous one when omitted).service_id (required), to_deployment_idDeployReference
scale_serviceSet how many replicas run (1 or more), without redeploying. Replicas that don't fit on the servers wait until there's room, and the result has a warning saying so. A very large change (20 or more replicas, and over 10 times the current count or twice what fits) is refused until confirmed: ask the user first, then call again with confirm: true.service_id (required), replicas (required), confirmDeployReference
restart_serviceRestart the service's replicas one at a time.service_id (required)DeployReference
create_projectA new, empty project (a group of services). Returns its id.team, name (required), description, namespaceFullReference
create_serviceCreate a service from a container image and deploy it. The project is found by name or id, or created when it doesn't exist. Returns the service id, deployment id and URL. 20 or more replicas is refused until confirmed: ask the user first, then call again with confirm: true.team, project, name (required), image (required), port, replicas, confirm, env, free_domain, domain, region, server_tagsFullReference
add_domainServe a service on a hostname, or on a free nip.io domain. It goes live in place, without a redeploy (a service never deployed gets it with its first deploy).service_id (required), hostname, free_domainFullReference
stop_serviceStop the service (scale to zero). Settings and data are kept.service_id (required)DeployReference

Account

ToolWhat it doesAccessAPI
get_meThe account these credentials act as: an API key's owner, or the person who connected an assistant.ReadReference
get_metaIts version, and the features a hosted Pyo turned on (none when self-hosted). No API key needed.ReadReference

State

ToolWhat it doesAccessAPI
get_stateOne snapshot of every team you're in (or the API key's teams): their projects, services and deployments, clusters and servers, domains, certificates, volumes, backups, registry logins, builders and recent activity. The dashboard renders from this, and scripts can read it too.ReadReference

Observability

ToolWhat it doesAccessAPI
get_access_logsThe web server's log of requests to a team's websites, newest first, filtered like the traffic figures.ReadReference
get_metricsCPU, memory, disk and network over time for a team's servers and services, sampled once a minute. Servers also get load and disk reads and writes. Each series lines up with times, with null where nothing was measured.ReadReference
get_observabilityVisits, requests, errors, response times, countries, pages and referrers for a team's websites: all of them, one project's, one service's, or one domain.ReadReference
get_observability_settingsWhether observability is on for this installation (it's off on a new install on a server with under 3.5 GB of memory), and what it keeps of visitors' IP addresses. small: the server Pyo runs on has under 3.5 GB of memory now. The installation's admin turns it on or off with setObservability.ReadReference
get_service_connectionsConnections to a service's public TCP and UDP ports through the gateway: per port, over time, by country and outcome ("ok", "blocked" by an IP rule, "limited" by the connection limit, "unreachable" when the service didn't answer), and the latest 50. A connection is counted when it closes (a UDP exchange after a minute without packets). Ports that bypass the gateway aren't counted.ReadReference
set_observabilityTurn observability (analytics, request logs, firewall and WAF history, usage history) on or off for the whole installation. Only the installation's admin can do this. Off stops storing and showing history and frees its memory. What was stored is kept for when it's back on. Live logs, current usage, deploys and the firewall keep working.FullReference

Services

ToolWhat it doesAccessAPI
create_service_from_specCreate a service and deploy it.FullReference
delete_serviceDelete a service and stop it everywhere. Its volumes are kept, detached, unless deleteVolumes.FullReference
get_service_previewWhether a service's site can be shown in the dashboard's preview frame: it answers, and doesn't forbid framing (X-Frame-Options, CSP frame-ancestors). Only the service's own first domain is asked, and never a private address.ReadReference
get_service_trafficIts domains and the addresses they point at, the servers that take public traffic and their regions, where its replicas run, and anything that keeps visitors from reaching it.ReadReference
reveal_secretShow a secret environment variable's value. Admins only, and logged. Returns a secret.FullReference
save_serviceSave a service's configuration. With deploymentId, roll it out too. Changes to its domains go live without a deploy once it has been deployed.FullReference
set_autoscaleTurn autoscaling on or change it. Null turns it off.DeployReference

Deployments

ToolWhat it doesAccessAPI
cancel_deploymentCancel a deployment that hasn't finished.DeployReference
create_deploy_hookCreate a deploy hook: a secret URL that deploys a service, or every service of a project.FullReference
remove_deploy_hookRemove a deploy hook. Its URL stops working.FullReference
reveal_deploy_hookShow a deploy hook's URL path (its secret token). Developers and up. Returns a secret.FullReference

Cron jobs

ToolWhat it doesAccessAPI
list_cron_runsA cron job's recent runs, newest first: when each started and finished, how it ended, and the end of what it printed.ReadReference
remove_cron_jobRemove a cron job from a service.FullReference
run_cron_jobRun a cron job now.DeployReference
save_cron_jobAdd a cron job to a service, or change one (by id).FullReference

Databases

ToolWhat it doesAccessAPI
add_database_backupChecks the admin login from the cluster, makes a backup user with it, then saves the database and its schedule. Team owners and admins.DeployReference
check_database_importEverything startDatabaseImport checks, without importing. The cluster connects to the source, which must be reachable from there, and checks the login, TLS, its version, its extensions and that every table is readable. It also checks that the database to import into is empty. Owners and admins.FullReference
connect_databaseConnect a service to a database on its cluster. Postgres adds DATABASE_URL (through the pooler when it's on) and DATABASE_URL_DIRECT, plus DATABASE_URL_READ with read replicas. MySQL adds DATABASE_URL (mysql://, to the primary), MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE. KV adds REDIS_URL (which follows failover and sends reads to read replicas), plus KV_REST_API_URL, KV_REST_API_TOKEN and KV_REST_API_READ_ONLY_TOKEN (reads only) with its REST API. With env, it adds only those, under the service's own names. With prefix, it adds all of them with that prefix, so two databases' variables don't clash. They're secret variables and apply on the service's next deploy.FullReference
create_databaseCreate a Postgres, MySQL or KV (Redis-compatible key-value, Valkey) database on one of the team's clusters. The first database on a cluster also sets up databases there, which takes a minute or two. size sets CPU and memory per instance: "small" (0.25 CPU, 512 MiB, 5 GiB), "medium" (0.5, 1 GiB, 10 GiB), "large" (1, 2 GiB, 20 GiB) or "xlarge" (2, 4 GiB, 50 GiB). MySQL needs 1 GiB, so "medium" or larger. instances is 1 for a single server with no automatic failover. For high availability, use a primary and 2 to 8 replicas for Postgres (instances 3 to 9), 2 to 4 for KV (3 to 5), or 2 or 4 for MySQL (3 or 5). A replica takes over when the primary's server is lost. MySQL has no pooler, read replicas or REST API. Developers and up.FullReference
delete_databaseDelete a database and its data. Refused while deletion protection is on or a service is connected. Owners and admins.FullReference
delete_database_backupStop backing up a database. Its existing backups stay in storage.FullReference
disconnect_databaseDisconnect a service from a database: removes the variables it added (on the next deploy).FullReference
get_databaseOne Postgres, MySQL or KV database, as listDatabases lists them.ReadReference
get_database_analyticsIts health over time, sampled about every 30 seconds. Per member (members: each instance, read replica, pooler and KV endpoint), its role, server, and series for cpu in cores, memoryMi, diskUsedGi (only where the volume reports its own space), connections and lagSeconds. For the whole database, transactions (Postgres), queries (MySQL), poolerQueries and commands (KV) per second, connections (primary, replicas, limit, and the pooler's poolerActive, poolerWaiting, poolerServersActive, poolerServersIdle and poolerMaxWaitSeconds), cacheHitRatio, keyHitRatio, evictions per second, routing (KV reads per second served by replicas or the primary, and fallbacks to the primary) and storage (sizeBytes, memoryUsedBytes, maxmemoryBytes, keys). Each series lines up with times, with null where nothing was measured. A series is null when the database doesn't report it.ReadReference
list_database_extensionsThe extensions Pyo's databases offer: Postgres extensions and KV modules. Each one's name, engine ("postgres" or "valkey"), section ("managed" ones are turned on with setDatabaseExtensions, and the database's owner adds "additional" ones with CREATE EXTENSION), a one-line description, its docs, its edition when it's a limited build, hidden when it's obsolete (shown only while a database has it on), and whether turning it on or off restarts the database (every KV module does).ReadReference
list_databasesA team's Postgres and MySQL databases and Valkey (Redis-compatible) KV databases: engine, version, size, instances, the cluster's status (phase, primary, ready instances, failovers), the services connected to each and their variables, passwords masked.ReadReference
restore_databaseRestore a Postgres or MySQL database into a new one, on the same cluster with the same size and availability: at targetTime (RFC 3339, within what its backups cover: from status.backup.firstRecoverabilityPoint to now for Postgres, to status.backup.lastSuccessfulBackup for MySQL) or the latest when omitted. Developers and up.FullReference
retry_database_importRuns a failed import again, from the same source. After a failure, Pyo keeps the URL's password (sealed), and an uploaded dump for PYO_DATABASE_IMPORT_RETENTION_HOURS (24 by default). A new database made for the import is made again. A database that already existed must still be empty. Owners and admins.FullReference
reveal_database_passwordShow a database's password, and a KV database's REST token and read-only token. Owners and admins. Recorded in the activity log.FullReference
run_database_backupBack up a database now.FullReference
set_database_backupsTurn a database's backups on or off, to the team's Backups destination. Postgres: every change archived continuously and a base backup daily, so it can be restored to any moment in the last retentionDays. MySQL: a full backup daily with the changes since the last one, so it can be restored to any moment in the last retentionDays up to its latest backup. Both are stored in the team's folder of the destination. KV: a snapshot scheduled daily or weekly, the last keep kept, listed in Backups with the team's other databases. Developers and up.FullReference
set_database_extensionsTurn a Postgres database's extensions or a KV database's modules on and off. extensions is the full list to have on, from listDatabaseExtensions with section "managed" for its engine. The database's owner adds Postgres's "additional" ones with CREATE EXTENSION. Some load a library, which restarts the database (restart). With high availability, it restarts one instance at a time and the primary hands over last. Every KV module restarts the database and needs KV 8.1. Turning a Postgres extension off drops it (DROP EXTENSION, without CASCADE). Postgres refuses while other objects depend on it, and the database's extensions shows this. Developers and up.FullReference
start_database_importCopies a Postgres or MySQL database into one of the team's: a new one (newDatabase), or an empty one (databaseId). From url (the source must be reachable from the cluster) or uploadId (a dump uploaded first). It's checked first, as checkDatabaseImport. Then the database's import shows how it goes ("pending", "running", "succeeded" or "failed", with a phase), and its logs have the import's output. Writes made to the source during the import aren't copied. Owners and admins.FullReference
update_databaseChange a database's size, instances, storage, version, pooler, REST API, read replicas or deletion protection. Instances are 1 for a single server, or for high availability 2 to 8 replicas for Postgres, 2 to 4 for KV, or 2 or 4 for MySQL. MySQL instances only grow. Storage only grows and the version only goes up. Only owners and admins can turn deletion protection off. Connected services get changed variables on their next deploy.FullReference
update_database_backupChange a backed-up database's schedule, or pause its backups.FullReference

Backups

ToolWhat it doesAccessAPI
remove_team_backup_settingsStop a team's backups.FullReference
reveal_backup_passwordShow the team's backup repository password, to restore without Pyo. Logged. Returns a secret.FullReference
run_team_backupBack up now: one service or volume (by id), or everything selected.FullReference
save_team_backup_settingsBack up a team's volumes and databases: where, how often and how many to keep. A blank secret keeps the saved one.FullReference
set_team_backup_selectionChoose what a team backs up: "all" but exceptions, or only the "selected" ones.FullReference

Domains

ToolWhat it doesAccessAPI
remove_certificateRemove an uploaded certificate no domain uses.FullReference
replace_certificateReplace a certificate with a renewed one. Services using it switch over in place, without a redeploy.FullReference
upload_certificateUpload a certificate for the team's domains: the chain and its private key, PEM.FullReference
verify_domainCheck a domain's DNS now.FullReference

Volumes

ToolWhat it doesAccessAPI
add_volumeAdd a persistent volume to a service, mounted at mountPath from its next deploy.FullReference
attach_volumeAttach a detached volume to a service on its cluster, mounted at mountPath from the service's next deploy. A service of another project (or any project, for a volume whose project was deleted) gets the volume moved into its project first, data, id and backups kept: the volume shows moving until its cluster has moved it, then it's attached (or moveError says why not). A volume can't move to another cluster. A volume on a one-server storage class keeps its data on that server, so the service must be able to run there.FullReference
delete_volumeDelete a detached volume and its data, for good. Admins only. The volume stays listed, being deleted, until its cluster confirms. Also deletes a volume Pyo has no record of, listed in its cluster's strayVolumes: pass that volumeId as id, with clusterId.FullReference
delete_volume_snapshotDeletes one of a volume's backups from the team's restic repository, with a short job on its cluster that waits for the volume's other backups and restores. The space it held is freed shortly after. Deleting one that's already gone succeeds. Owners and admins.FullReference
detach_volumeDetach a volume from its service: unmounted from the next deploy. The volume and its data stay, to attach again or delete.FullReference
list_volume_snapshotsIts backups in the team's restic repository, newest first, read from its cluster on request (a short job there). Takes up to two minutes.ReadReference
resize_volumeGrow a volume to sizeGi GB (never shrink it). Owners and admins. Only on a storage class that can grow volumes (allowVolumeExpansion). A local-path volume has no size limit of its own, so there's nothing to grow. The volume shows resizeTo until its cluster reports the new size. Some storage classes finish when its service next starts.FullReference
restore_volumeRestore a volume from one of its snapshots (see listVolumeSnapshots), replacing its data. Owners and admins. Its service stops while the restore runs and starts again afterwards, even when it fails. The snapshot is restored next to the data and swapped in only once complete, so a failed restore leaves the data as it was. The volume needs room for the snapshot while this runs. The volume shows restore while it runs, then restoredAt, or restoreError with why it failed.FullReference

Teams

ToolWhat it doesAccessAPI
create_teamCreate a team. You become its owner.FullReference
delete_teamDelete a team and everything in it. Owners only.FullReference
invite_memberInvite someone to a team by email, as owner, admin, developer or viewer.FullReference
remove_memberRemove a member from a team, or revoke an invite.FullReference
resend_inviteMake a new invite link (the earlier one stops working) and mail it, or with send: false only return it to share.FullReference
rotate_data_keyGive the team a new data key and seal its stored secrets again with it.FullReference
update_member_roleChange a member's role: "owner", "admin", "developer" or "viewer".FullReference
update_teamRename a team, change its description, default cluster or preferences.FullReference

Projects

ToolWhat it doesAccessAPI
delete_projectDelete a project and its services. Its volumes are kept, detached, unless deleteVolumes.FullReference
import_composeCreate a project and its services from a Docker Compose plan (from POST /compose/preview, edited if you like), and deploy them in order.FullReference
preview_composeWhat importing a Compose file would create: a project, and a service per Compose service with its source, ports, variables, volumes and health check, in deploy order. It adds a warning for each thing that isn't carried over. Nothing is created. Edit the plan if you like, then pass it to the importCompose operation.ReadReference
set_project_isolationIsolate a project's network: only its own services and the web server reach them.FullReference
update_projectRename a project or change its description.FullReference

Clusters

ToolWhat it doesAccessAPI
create_clusterAdd a cluster. The response has the command that connects its first server.FullReference
discard_cluster_draftDiscard a cluster that was added but never connected.FullReference
remove_clusterRemove a cluster from Pyo. Its servers keep running.FullReference
rotate_agent_tokenA new connect command for a cluster. The old one stops working.FullReference
set_cluster_free_domain_addressWhere the cluster's free domains (<name>.<ip>.nip.io) point: "public" (its public IP, for everyone) or "tailscale" (its Tailscale IP, only from the tailnet). With "tailscale", services are reachable from your tailnet on ports 80 and 443 whether or not the cluster takes public traffic. Free domains on it move to the new address in place. By default it's public when the cluster takes public traffic and a server has its public IP itself (on a network card or as its ExternalIP) or a load balancer gives it one. Behind NAT, it's Tailscale.FullReference
set_cluster_public_trafficWhether a cluster takes public traffic: the gateway answers on every server but build-only ones (ports 80 and 443, and public TCP and UDP ports through it). Off: services are only reachable inside the cluster.FullReference
set_cluster_web_proxy_protocolRead the visitor's address from a PROXY protocol header on the cluster's websites (ports 80 and 443), for a cluster behind another load balancer. Connections without one still work.FullReference
update_clusterRename a cluster or change its description, location or tags.FullReference

Servers

ToolWhat it doesAccessAPI
cancel_server_removalStop a server removal that's waiting or failed. The server takes work again.FullReference
join_serverA script that joins a new server to a cluster (its token is valid for an hour).FullReference
remove_serverTake a server out of its cluster, moving its services off first. force removes it at once, for a machine that's gone.FullReference
set_server_maintenancePut a server in maintenance (its services move elsewhere), or bring it back.FullReference
set_server_regionSet a server's region: a name ("US East", "Singapore, SG"), or "" to detect it again.FullReference
set_server_regular_servicesOn a GPU server: also run regular services, or keep it for GPU work. Null goes back to the default.FullReference
set_server_schedulableWhether new work may be placed on a server.FullReference
set_server_tagsSet a server's tags.FullReference

Firewall

ToolWhat it doesAccessAPI
add_firewall_ruleAdd an access rule to the end of a service's firewall. Allow and block rules are checked in order, and the first match decides. With no match, the client gets in. Rate limit rules then apply to websites, and each matching one counts the request, per client address and per server.FullReference
add_waf_ruleAdd a custom web application firewall rule to a service. Custom rules run in order before the OWASP rules, while the service's WAF is on. It goes last in the list.FullReference
get_firewall_blockedWhat a service's firewall turned away: website requests (a 403, or a 429 over a rate limit) and connections to TCP ports through the gateway. It shows them over time (series), per rule, per source, country and website path, and the latest 50. A rule is its id, or "blocked" or "rate-limit" when no rule matches the source now. UDP ports and ports that bypass the gateway aren't counted.ReadReference
get_waf_hitsWhat a service's web application firewall found: requests it blocked, and ones it only logged in log-only mode. It shows them over time (series), per rule, domain, source, country and path, and the latest 50 with the rules that matched. custom shows how often each custom rule matched, by its number. Query strings are kept with sensitive values redacted.ReadReference
remove_firewall_ruleRemove a firewall access rule.FullReference
remove_waf_ruleRemove a custom web application firewall rule.FullReference
reorder_firewall_rulesPut a service's firewall access rules in this order: allow and block rules are checked from the first. List every one of its rules.FullReference
reorder_waf_rulesPut a service's custom web application firewall rules in this order. List every one of its rules.FullReference
set_service_wafA service's web application firewall (WAF) settings, for all its domains. "log" or "block" turns it on: the WAF starts on the service's cluster with the first service there that turns it on, and stops after the last one turns it off.FullReference
update_firewall_ruleChange a firewall access rule. Omitted fields stay as they are (as in addFirewallRule).FullReference
update_waf_ruleChange a custom web application firewall rule. Omitted fields stay as they are.FullReference

Builders

ToolWhat it doesAccessAPI
create_builderAdd a builder that builds images from Git on one of the team's servers (kind "cluster").FullReference
remove_builderRemove a builder.FullReference
rotate_builder_tokenA new token for a builder. The old one stops working.FullReference

Images

ToolWhat it doesAccessAPI
create_registry_tokenCreate a token to push (or only pull) the team's own images in Pyo registry, as <host>:5443/<team>/<project>/<service>:<tag>. These are slugs, and <host> is the installation's tailnet name. A push needs that project and service to exist. It works over HTTPS from a device on the installation's tailnet. Team owners and admins. The token comes back only once, with the username, address and team path to log in and push with.FullReference
get_registryPyo's registry, where the images it builds from Git and the team's own pushes are kept, as one team sees it: its address, where it runs (when the team has that cluster), whether Pyo reaches it, the space the team's images take, the team's repositories (tags, size, last build) and its cleanup: how many deployments' images are kept per service, and when images were last removed (within the last week). Read only.ReadReference
list_imagesEvery image a team's services deployed, by repository, with each version's deployments, the services that used it and whether one runs it now.ReadReference
remove_registry_loginRemove a registry login.FullReference
revoke_registry_tokenRevoke a Pyo registry token. Team owners and admins.FullReference
save_registry_loginSave a login for a private registry, one per host. Pyo checks it with the registry first.FullReference

GitHub

ToolWhat it doesAccessAPI
get_github_build_fileAPI key access: read.ReadReference
github_install_urlThe GitHub page where a team installs the GitHub App.FullReference
list_github_reposThe repositories the team's GitHub installations can see, to deploy from.ReadReference
remove_github_installationUnlink a GitHub installation from a team.FullReference

Integrations

ToolWhat it doesAccessAPI
check_secret_importThe key names at a path of a secret store, to check it before importing. Never values.FullReference
remove_integrationRemove a team integration's key.FullReference
save_integrationSave a team integration's key (kind "tailscale": an auth key, used when servers join over Tailscale).FullReference

On this page

Edit page