You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
push-actor has no counterpart: an agent can ship source to the platform but cannot read it back. An Actor whose code is not in the sandbox, because it was pushed from another machine or created in Apify Console, cannot be fixed over MCP; the agent has to ask the user for the files. apify pull does this for the CLI.
Proposal
A pull-actor tool in the versions category taking actor (ID or name) and an optional versionNumber (defaults to the only version). For a SOURCE_FILES version it returns the files as push-actor takes them: path, content, and base64 encoding for binary files, straight from GET /v2/acts/{actorId}/versions/{v}. For a TARBALL version it downloads the zip and unzips it. Versions from a Git repository or gist are reported as such, not fetched: the response carries the sourceType and the repository URL with its branch and subdirectory (https://…/repo.git#branch:subdir), and tells the agent to clone it in its sandbox. The server does not clone arbitrary URLs, and private repositories are reachable only with the platform's deployment key, which the MCP server does not have; the agent's own git access does the job.
Notes
Git-sourced Actors and push-actor. As in the CLI, push-actor with mode: replace on a GIT_REPO or gist version switches it to files hosted on Apify, and the repository stops deploying. The CLI warns the user when it does this; pull-actor must say it up front ("this Actor builds from repository X, branch Y; commit there, a push would detach it"), and push-actor should say in its response that the switch happened (a small follow-up on feat: Add push-actor tool #1333).
Sources can be up to 3 MiB inline and larger as a zip, so the response needs a size guard: report file paths and sizes always, and let the caller pick files or accept a cap on the total returned. The design decides where the cap sits.
The files come back in the exact shape push-actor accepts, so pull, edit, push is a round trip.
Secrets are not involved; environment variables are not part of the source.
Problem
push-actorhas no counterpart: an agent can ship source to the platform but cannot read it back. An Actor whose code is not in the sandbox, because it was pushed from another machine or created in Apify Console, cannot be fixed over MCP; the agent has to ask the user for the files.apify pulldoes this for the CLI.Proposal
A
pull-actortool in theversionscategory takingactor(ID or name) and an optionalversionNumber(defaults to the only version). For aSOURCE_FILESversion it returns the files aspush-actortakes them: path, content, andbase64encoding for binary files, straight fromGET /v2/acts/{actorId}/versions/{v}. For aTARBALLversion it downloads the zip and unzips it. Versions from a Git repository or gist are reported as such, not fetched: the response carries thesourceTypeand the repository URL with its branch and subdirectory (https://…/repo.git#branch:subdir), and tells the agent to clone it in its sandbox. The server does not clone arbitrary URLs, and private repositories are reachable only with the platform's deployment key, which the MCP server does not have; the agent's own git access does the job.Notes
Git-sourced Actors and
push-actor. As in the CLI,push-actorwithmode: replaceon aGIT_REPOor gist version switches it to files hosted on Apify, and the repository stops deploying. The CLI warns the user when it does this;pull-actormust say it up front ("this Actor builds from repository X, branch Y; commit there, a push would detach it"), andpush-actorshould say in its response that the switch happened (a small follow-up on feat: Add push-actor tool #1333).Sources can be up to 3 MiB inline and larger as a zip, so the response needs a size guard: report file paths and sizes always, and let the caller pick files or accept a cap on the total returned. The design decides where the cap sits.
The files come back in the exact shape
push-actoraccepts, so pull, edit, push is a round trip.Secrets are not involved; environment variables are not part of the source.
Part of #1351.
Draft PR: #1433