This feature existed in the Workspace (formerly “Space”) file system and was crucial for code reviews. The GitHub Connector is a cost-saving replacement for Workspace, but lacks this critical functionality.
Thanks for the detailed request. The tool you want I believe already exists, and there are two ways to read the current state of a file.
1. Connector only. The GitHub connector exposes additional tools. One of them is get_file_contents. It takes owner, repo, and path (plus an optional ref) and returns the current file, or a directory listing if path points to a folder.
You can see the full tool set by making a request with only the connector and reading the mcp_list_tools item in the output.
2. Connector plus sandbox. If you add the sandbox tool using {"type": "sandbox"} to the same request and leave allowed_tools off, then the agent gets git and gh inside a Linux container, already authenticated with the connector’s credentials. It can clone the repo and read src/lib/components/DialogMessage.svelte directly, diff branches, run gh api repos/{owner}/{repo}/contents/{path}, and open a pull request. You will see sandbox_results items in the output instead of mcp_call items. Access is scoped to whatever the connected GitHub account can reach.
I can confirm this exact issue with the Perplexity GitHub connector.
`get_file_contents` doesn’t work, the LLM says that it returns only: “successfully downloaded text file” but the actual file content is never shown or accessible.
This makes it impossible to read current files directly from repositories.
Workaround that the LLM does to get the full content of a file:
The LLM is using `get_commit` with `detail: “full_patch”` to see file contents through commit diffs and reconstructing the full file iterating commit by commit.
Hope this gets fixed soon, as it’s a basic feature for a GitHub integration
I ran the managed Github connector with, and without, the sandbox tool, and each time I was able to retrieve the file contents and the connectors worked as expected.
For my test I used GPT 5.6 SOL as the model and retrieved a GitHub repo README file.
Which model were you using and was the file you were trying to retrieve very large?
Sonnet 5 with reasoning. I also tested with GPT 5.6 Terra (with reasoning) and same problem. I didn’t use the sandbox tool. I don’t have access to GPT 5.6 SOL
@kr0n Ah, I understand. This is for the application, rather than the API. The GitHub connector and tool I have access to are through the Perplexity Agent API. To get your account associated with a new or existing support ticket for the application, please use the “share feedback” button in the app menu and select “bug report”. This routes the bug to the application support team.