# MCP tool reference

Every tool the yaya-mcp server offers, grouped by job, with the key each one needs.

Source: https://yaya.page/support/articles/developers/mcp-tool-reference
Last updated: 2026-10-02

## Before you start
- The `yaya-mcp` server set up in your MCP client. See [Connect an agent with MCP](/support/articles/developers/connect-an-agent-with-mcp).
- Saved credentials. Run `yaya setup` or `yaya login key` once. Every tool except `yaya_publish_anonymous` and `yaya_agent_signup` needs them.

## Add the server to a client
Most clients take a JSON block like this one. Restart the client after you save it.

```
{
  "mcpServers": {
    "yaya": { "command": "yaya-mcp" }
  }
}
```

The server talks to `https://api.yaya.page` by default. Set `YAYA_BASE_URL` in the server's `env` to use another origin.

## Which key a tool uses
- **Workspace key** (`yaya_sk_`): publishing, live files and the version list.
- **Account key** (`yaya_ak_`): profile, email, payment methods, domains and vanity subdomains. Each tool needs the scope named below.
- **Signed-in session**: account keys, variables, support, and version restore and delete. Set `YAYA_SESSION_TOKEN` for these.

Arguments are listed in brackets. A `?` marks one you can leave out. Names are snake case, like `tenant_id`.

## Start and publish
- `yaya_get_openapi` (): fetch the OpenAPI document and return how many paths it has. Use it to check the connection.
- `yaya_publish_anonymous` (`files`, `expires_in_seconds?`): publish files with no account. Returns a live `pub-` address for up to 24 hours and a claim link. `files` maps each path to its text, and must include `index.html`.
- `yaya_agent_signup` (`email`, `client?`, `base_url?`): sign up with an email. Emails a confirmation link; workspace access requires inbox proof.
- `yaya_agent_publish` (`files`, `tenant_id?`): write `files` as the workspace draft, then publish it. Without `tenant_id` it uses the signup workspace.
- `yaya_tenant_publish` (`tenant_id`, `idempotency_key?`): publish a workspace's current draft.
- `yaya_publish_create` (`idempotency_key?`, `body?`): reserved for `POST /api/v1/publish`. It returns "not implemented" until that route ships.

## Live files
- `yaya_list_publish_files` (`slug`, `cursor?`): list the files on a live site.
- `yaya_publish_file_read` (`slug`, `path`): read one live file.
- `yaya_head_publish_file` (`slug`, `path`): read one file's size and ETag without the body.

## Versions
- `yaya_list_site_versions` (`tenant_id`): list a workspace's site versions.
- `yaya_restore_site_version` (`tenant_id`, `version_id`, `expected_live_version_id?`): make an older version live. Needs a session.
- `yaya_delete_site_version` (`tenant_id`, `version_id`): delete a version that is not live. Needs a session.

## Profile and sites
- `yaya_get_account` (): show who the saved credentials belong to.
- `yaya_get_profile` (): read your profile. Needs `profile:read`.
- `yaya_patch_profile` (`enabled?`, `add_new_sites_to_profile?`, `bio?`, `link?`): change your profile. Needs `profile:write`.
- `yaya_patch_profile_username` (`username`): change your username. Needs `profile:write`.
- `yaya_list_profile_sites` (): list the sites on your profile. Needs `profile:read`.
- `yaya_add_profile_site` (`slug`): add a site to your profile. Needs `profile:write`.
- `yaya_remove_profile_site` (`slug`): remove a site from your profile. Needs `profile:write`.

## Vanity subdomains
- `yaya_get_vanity_urls` (`tenant_slug?`): show your vanity subdomain and domain settings.
- `yaya_get_vanity_subdomain` (`tenant_slug?`): show the claimed subdomain.
- `yaya_check_vanity_subdomain_availability` (`name`, `tenant_slug?`): check if a name is free.
- `yaya_claim_vanity_subdomain` (`subdomain?`, `tenant_slug?`): claim a subdomain.
- `yaya_release_vanity_subdomain` (`tenant_slug?`): give the subdomain back.
- `yaya_reprovision_vanity_subdomain` (`tenant_slug?`): set the subdomain up again after a failure.

## Domains
- `yaya_search_domains` (`q`): search names to buy. Uses the test registrar, so it never charges.
- `yaya_check_domain` (`host`): check one hostname.

## Mounts
- `yaya_list_mounts` (`tenant_slug?`): list the paths where a site is mounted.
- `yaya_create_mount` (`slug`, `mount_path`, `tenant_slug?`): mount a site at a path.
- `yaya_get_mount` (`mount_path`, `tenant_slug?`): read one mount.
- `yaya_update_mount` (`mount_path`, `slug`, `tenant_slug?`): point a mount at another site.
- `yaya_delete_mount` (`mount_path`, `tenant_slug?`): remove a mount.

## Drives
- `yaya_get_default_drive` (`tenant_slug?`): get the workspace's default drive id.
- `yaya_put_drive_file` (`drive_id`, `path`, `content_base64`, `content_type?`, `tenant_slug?`): upload a file.
- `yaya_read_drive_file` (`drive_id`, `path`, `tenant_slug?`): read a file back as base64.
- `yaya_delete_drive_file` (`drive_id`, `path`, `tenant_slug?`): delete a file.

## Analytics and workspaces
- `yaya_get_me_analytics` (`range?`, `tenant_slug?`): read visit totals across your sites.
- `yaya_list_me_workspaces` (`tenant_slug?`): list the workspaces you belong to.

## Email
Each email tool needs `email:write`.

- `yaya_get_email_change` (): read a pending email change.
- `yaya_start_email_change` (`new_email`): send a code to a new address. It may start a security hold.
- `yaya_confirm_email_change` (`code?`): confirm with the code. Signs out your other sessions. Without `code` it reads `YAYA_EMAIL_CHANGE_CODE` from the server's environment.
- `yaya_cancel_email_change` (): cancel the pending change.

## Payment methods
- `yaya_list_payment_methods` (): list saved methods. Needs `billing:read`.
- `yaya_setup_payment_method` (): get a test-mode page to save a method. It never charges. Needs `billing:write`.
- `yaya_set_default_payment_method` (`payment_method_id`): choose the default method. Needs `billing:write`.
- `yaya_delete_payment_method` (`payment_method_id`): remove a method. Needs `billing:write`.

## Account keys
These need a signed-in session.

- `yaya_list_account_keys` (): list your account keys.
- `yaya_mint_account_key` (`name`, `scopes`, `expires_at?`): create an account key. The secret comes back once.
- `yaya_revoke_account_key` (`key_id`): revoke an account key.

## Variables
Variables hold secrets for your sites. Values are never sent back. These need a signed-in session.

- `yaya_list_variables` (`tenant_slug?`): list variable names.
- `yaya_get_variable` (`name`, `tenant_slug?`): read one variable's details.
- `yaya_set_variable` (`name`, `value`, `allowed_upstreams?`, `tenant_slug?`): create or change a variable.
- `yaya_delete_variable` (`name`, `tenant_slug?`): delete a variable.

## Support
- `yaya_submit_support_request` (`subject`, `message`, `tenant_slug?`): send a message to support. Needs a session.

## Errors
A failed tool returns JSON with `ok: false`, the HTTP `status`, `errorCode` with the API error code, and `message`. `code` names the error class, like `YayaApiError`. A rate limit adds `retryAfterSeconds`. See [Fix API authentication errors](/support/articles/developers/fix-api-authentication-errors).
