File uploads

MCP tools for repo-scoped file uploads.

Tools

  • list_file_uploads
  • get_file_upload
  • create_file_upload
  • update_file_upload
  • delete_file_upload
  • get_file_upload_content

Parameters

  • repo: repo locator such as teams/team_slug/repo_slug or username/repo_slug.
  • uuid: file upload UUID for read/update/delete/content calls.
  • filename, content_base64, description, and content_type for create.

Example

curl -X POST https://ghit.example/api/v1/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "create_file_upload",
      "arguments": {
        "repo": "teams/acme/webapp",
        "filename": "screenshot.png",
        "content_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
        "description": "Build screenshot",
        "content_type": "image/png"
      }
    }
  }'

Notes

  • The tool responses return the same file-upload resource shapes as the REST API.
  • Stored bytes are fetched from repo- and file-UUID buckets; callers do not supply paths directly.