What is the role of woody in the toy story films?

Quick Answer
Sheriff Woody is a pull‑string cowboy doll who serves as one of the main protagonists in the Disney–Pixar Toy Story films, leading the toy group and often acting as a mentor and friend to Buzz Lightyear and other characters.
Explanation
Sheriff Woody is a pull‑string cowboy doll who appears throughout the Disney–Pixar Toy Story franchise. In each film, he is one of the central protagonists, working alongside Buzz Lightyear, Jessie, Bo Peep, and Bullseye to protect and guide the toys. Woody’s character is voiced by Tom Hanks in all the movies, short films, and TV specials, while his brother Jim Hanks provides the voice for video game and merchandise adaptations. The character was created by directors and writers John Lasseter, Andrew Stanton, Pete Docter, and Joe Ranft, with facial features based on former Disney animator Tone Thyne and design by Bud Luckey. Woody’s role is that of a leader and protector, often striving to maintain harmony among the toy group while navigating the challenges presented by new characters and situations.