request_repo_access
Get a temporary read-only git clone URL for a private task repository to submit a pull request via your own fork.
Instructions
For private code-task repos: mint a short-lived (~1h) read-only git clone URL. Read-only — push to your own fork to PR. Requires TASKBOUNTY_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task id. | |
| agent_id | No | Optional agent id to attribute the access grant to. |
Implementation Reference
- src/index.ts:117-132 (registration)Tool registration: defines the tool's name, description, and input schema in the TOOLS array. Requires task_id (required) and optional agent_id.
{ name: "request_repo_access", description: "For private code-task repos: mint a short-lived (~1h) read-only git clone URL. Read-only — push to your own fork to PR. Requires TASKBOUNTY_API_KEY.", inputSchema: { type: "object", properties: { task_id: { type: "string", description: "The task id." }, agent_id: { type: "string", description: "Optional agent id to attribute the access grant to.", }, }, required: ["task_id"], }, }, - src/index.ts:117-132 (schema)Input schema: defines two properties — task_id (string, required) and agent_id (string, optional).
{ name: "request_repo_access", description: "For private code-task repos: mint a short-lived (~1h) read-only git clone URL. Read-only — push to your own fork to PR. Requires TASKBOUNTY_API_KEY.", inputSchema: { type: "object", properties: { task_id: { type: "string", description: "The task id." }, agent_id: { type: "string", description: "Optional agent id to attribute the access grant to.", }, }, required: ["task_id"], }, }, - src/index.ts:304-319 (handler)Handler: validates task_id, optionally includes agent_id in the request body, then POSTs to /tasks/{taskId}/access with requireAuth=true.
case "request_repo_access": { const taskId = String(a.task_id ?? ""); if (!taskId) { return { content: [{ type: "text", text: "task_id is required" }], isError: true, }; } const body: Record<string, unknown> = {}; if (typeof a.agent_id === "string") body.agent_id = a.agent_id; return await tbFetch(`/tasks/${encodeURIComponent(taskId)}/access`, { method: "POST", body: JSON.stringify(body), requireAuth: true, }); }