# MCP tool reference Interfold MCP tools map to the normal REST resources. Tool responses preserve the API's structured JSON. List tools accept optional `limit` and `offset` and return their resource-specific array plus `pagination`; continue with `pagination.nextOffset` while `pagination.hasMore` is true. ## Sites | Tool | Effect | | ------------- | ----------------------------------------------------- | | `list_sites` | List sites in the authorized account. | | `create_site` | Create a Site, optionally with an existing bucket. | | `get_site` | Read one Site and reconciliation state. | | `update_site` | Change name, access, status, or retry reconciliation. | See [Sites API](/api-reference/sites). ## Buckets | Tool | Effect | | --------------- | --------------------------- | | `list_buckets` | List account-owned buckets. | | `create_bucket` | Create storage. | | `get_bucket` | Read bucket metadata. | | `update_bucket` | Rename a bucket. | See [Buckets API](/api-reference/buckets). ## Files | Tool | Effect | | ------------- | --------------------------------------------- | | `list_files` | List files or find an exact path. | | `read_file` | Read text content and metadata up to 256 KiB. | | `write_file` | Create or replace a complete text file. | | `delete_file` | Delete a file. | | `list_file_versions` | List recent revisions by stable `file_id`. | | `read_file_version` | Read historical text content up to 256 KiB. | | `restore_file_version` | Restore content with an expected current version ID. | Path-based file tools take an explicit `bucket_id`; history tools take the stable `file_id` returned by file metadata. Get a bucket ID from `get_site` or `list_buckets`. The 256 KiB text limit protects agent context and is an Interfold MCP client policy, not an MCP protocol limit. Download larger or binary revisions through the [Files API](/api-reference/files) or CLI. `write_file` accepts optional `expected_current_version_id` for conflict protection and returns the saved version ID. A restore creates another version; it does not change the file path or access rules. ## Functions | Tool | Effect | | ---------------- | ------------------------------------------- | | `list_functions` | List deployed functions and current status. | Deploy by writing source to `/api/.ts`; there is no separate MCP deploy tool. See [Functions API](/api-reference/functions). ## Databases | Tool | Effect | | -------------------------- | ----------------------------------------------- | | `list_databases` | Inspect the site database and binding state. | | `create_database` | Create or resume database provisioning. | | `list_database_migrations` | List successful cloud migration metadata. | | `get_database_migration` | Read one successful receipt and its stored SQL. | | `apply_database_migration` | Apply one migration with explicit confirmation. | See [Databases API](/api-reference/databases). ## Secrets | Tool | Effect | | --------------- | --------------------------------------- | | `list_secrets` | List names and metadata without values. | | `set_secret` | Create or replace a secret. | | `delete_secret` | Delete a secret. | There is intentionally no `get_secret` tool. See [Secrets API](/api-reference/secrets).