Moed Katan3: 3
וְאֵלּוּ כּוֹתְבִין בַּמּוֹעֵד: קִדּוּשֵׁי נָשִׁים, גִּטִּין וְשׁוֹבָרִין, דְּיַתִּיקִי, מַתָּנָה, וּפְרוֹזְבּוּלִין, אִגְּרוֹת שׁוּם וְאִגְּרוֹת מָזוֹן, שְׁטָרֵי חֲלִיצָה וּמֵאוּנִים, וּשְׁטָרֵי בֵרוּרִין, וּגְזֵרוֹת בֵּית דִּין, וְאִגְּרוֹת שֶׁל רָשׁוּת.
And these [documents] may be written during [Chol] HaMoed: Instruments of betrothal, divorces, receipts, testaments, gifts, prozbulin, evaluation documents, support documents, chalitzah certificates, refusals, selection contracts, court edicts, and government documents.
Moed Katan3: 4
אֵין כּוֹתְבִין שְׁטָרֵי חוֹב בַּמּוֹעֵד. וְאִם אֵינוֹ מַאֲמִינוֹ, אוֹ שֶׁאֵין לוֹ מַה יֹּאכַל — הֲרֵי זֶה יִכְתֹּב.  אֵין כּוֹתְבִין סְפָרִים, תְּפִלִּין וּמְזוּזוֹת בַּמּוֹעֵד, וְאֵין מַגִּיהִין אוֹת אַחַת, אֲפִלּוּ בְסֵפֶר (עֶזְרָא) [הָעֲזָרָה]. רַבִּי יְהוּדָה אוֹמֵר: כּוֹתֵב אָדָם תְּפִלִּין וּמְזוּזוֹת לְעַצְמוֹ, וְטֹוֶה עַל יְרֵכוֹ תְּכֵלֶת לְצִיצִיתוֹ.
We may not write loan contracts during [Chol] HaMoed. However, if he does not trust him, or if he has nothing to eat, then he may write.  We may not write Books [of Scripture], nor tefillin, nor mezuzos during [Chol] HaMoed. We may not correct a single letter even in the [Torah] scroll of the Temple court. R' Yehudah says: A person may write tefillin or mezuzos for his personal use; and he may spin the blue thread for his tzitzis, on his thigh.