"We're excited to get him out there," Shanahan said of Foster, who had shoulder concerns raised by multiple teams before the 2017 NFL Draft.
The 49ers' top pick, Solomon Thomas, taken 28 spots ahead of Foster in the first round at No. 3 overall, remained unsigned as of Thursday's workout.
Foster, though, was itching to go. General manager John Lynch said in an interview with KNBR the 49ers "Almost had to put a leash on him to keep him out of drills. His excitement is infectious. He's an Alpha Dog."
San Francisco traded back into the first round to selected the 23-year-old Foster with the 31st overall selection in April's draft. The 49ers dealt their second-round pick (No. 34 overall) and a fourth-rounder acquired from the Chicago Bears earlier in the night (No. 111 overall) to the Seattle Seahawks for pick No. 31.
Foster fell in the draft after reports surfaced that his medical recheck revealed concerns about his right shoulder. He underwent surgery for a rotator cuff problem in February.
Listed at 6 feet, 229 pounds, Foster was considered the best inside linebacker in the draft. He was ranked No. 10 overall by NFLDraftscout.com and among the top 10 by many. But questions arose after he was sent home from the Indianapolis Combine for causing a commotion during his medical exam. He technically flunked his drug test because the urine sample was diluted by too much water.
On the field for Alabama, Foster displayed undeniable talent. He was perhaps the most intimidating hitter in the draft, and he possesses the fluid athleticism to serve as a three-down defender.
In four years with the Crimson Tide, two as a starter, Foster totaled 222 tackles, with 115 collected last year while winning the Butkus Award as the best linebacker in college.