There is an old, rather crude method that needs the craftsman himself to have sufficient experience.
If the larger ship has a workshop with machine-tools it will have a grinding-wheel for re-sharpening tools. Grinding the specimen will produce a shower of sparks whose appearance gives a very approximate idea of the grade or hardness of the metal. The ship’s engineering-officer will know what steels they had taken on board for repairs, so this method is likely to be close enough for the purpose.
A possibly more credible scene, would be that as he has to seek his host’s permission to use their workshop anyway, is the ship’s artificer identifying suitable material from the scrap-bin.
Here, this is likely by the bar-ends still holding its manufacturer’s own, painted colour-code that identifies the particular alloy. It is not a trade-standard though. In a well-regulated workshop as one would hope on board ship, each job will take its metal from the unpainted end of the stock bar, keeping the stock identifiable right to the point at which it becomes too short to use.
[How do I know? I spent eight years running a factory’s metals store, and was always careful to cut each job’s allocation from the unpainted end!]
To be honest, it is not very likely the ship’s artificer would let the visitor use his workshop unless the two men know each other well at a professional level. More credibly, then, the boat owner would come to some private, unofficial arrangement with the ship’s engineer for the latter actually to machine the component; even if the former watches the operation.
Without treading too much on your literary toes, have you considered your intended, primary readership? Workshop minutiae may not mean much to them, so describing the making is fine but the relationship between the two mariners, and the urgency and success of the repair, might be more significant.