
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given the point $P(\sqrt{2}+1,2- \sqrt{2})$, the point $M(3,1)$, and the circle $C$: $(x-1)^{2}+(y-2)^{2}=4$.

$(1)$ Find the equation of the tangent line to circle $C$ passing through point $P$;

$(2)$ Find the equation of the tangent line to circle $C$ passing through point $M$, and calculate the length of the tangent.

Present the answer in LaTex format: \boxed{Your answer}
user