TT #51 · Parashas Vayeishev · Passuk 38:28
While she was in labor, one of them put out a hand, and the midwife tied a crimson thread on that hand, to signify: This one came out first.
Torah Temimah points to Yerushalmi Bava Basra 3:1.
Sefaria — Yerushalmi Bava Basra 3:1
“This one came out first” — from here [we learn] that the midwife is believed to testify that a firstborn is a firstborn.
Derash on the verse (Bavli sugya) — not a formal named middah of the 13. A delivery narrative authorizes a witness category.
A midwife is believed to testify about which child is the bechor.