GET_FILE_CONTENT
Get the content of a file from a repository.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Repository owner |
repo | string | yes | Repository name |
path | string | yes | File path in the repo (e.g. 'src/main.py') |
ref | string | — | Branch, tag, or commit SHA (default: default branch) |
How to use it
You normally trigger this by describing what you want in chat — the agent selects GET_FILE_CONTENT automatically. For example:
Try saying
“get my github”
In a workflow
As a step in a multi-step workflow DAG:
json
{
"id": "s1",
"agent": "github",
"action": "GET_FILE_CONTENT",
"args": {
"owner": "…",
"repo": "…",
"path": "/Users/me/Documents/file.txt"
},
"depends_on": [],
"outputs": []
}Direct call
For scripting, call it directly via POST /execute_tool. Every tool returns { success, message, data }.
bash
curl -X POST http://127.0.0.1:8000/execute_tool \
-H "Content-Type: application/json" \
-d '{"tool_name":"GET_FILE_CONTENT","args":{"owner":"…","repo":"…","path":"/Users/me/Documents/file.txt"}}'Part of the github plugin. Browse the full Plugin & Tool Catalog or the relevant feature guide.