The DMG says smith's tools alone are not enough, and you also require a spellcaster; but as per Xanathar's Guide it's allowable if your DM says so.
Two sources have rules for magic item crafting: the Dungeon Master's Guide, and Xanathar's Guide to Everything. The latter presents an alternative rules which may be used, meaning it's up to your DM whether they use the DMG rules, the Xanathar's rules, or something else.
Dungeon Master's Guide
The Dungeon Master's Guide, p. 128, defines that it's entirely up to the DM how the players craft items, or whether it's possible at all:
Magic items are the DM’s purview, so you decide how they fall into the party’s possession. As an option, you can allow player characters to craft magic items.
It describes the process necessary to create magic items:
The creation of a magic item is a lengthy, expensive task. To start, a character must have a formula that describes the construction of the item. The character must also be a spellcaster with spell slots and must be able to cast any spells that the item can produce. [...] You [the DM] can decide that certain items also require special materials or locations to be crafted. [...] Multiple characters can combine their efforts if each of them meets the level prerequisite. Each character can contribute spells, spell slots, and components, as long as everyone participates during the entire crafting process.
The DMG appears to define that you require a spellcaster to craft items. However, it's possible that a non-spellcaster with smithing tools may contribute "components", if the DM decides that one of the formula's components is a crafted item like the actual crafted sword to be enhanced, which is entirely plausible. Smithing tools can make a sword, but it takes a spellcaster to make a magical sword.
In other words, as per the DMG it's heavily up to the DM. This is different to earlier editions of the game, which more strictly defined the item creation formulae.
Xanathar's Guide to Everything
These rules are expanded upon in Xanathar's Guide to Everything, p. 128, which defines that you must have either smithing tool proficiency or the Arcana skill proficiency to make magic weapons:
To complete a magic item, a character also needs whatever tool proficiency is appropriate, as for crafting a nonmagical object, or proficiency in the Arcana skill.
The rules in Xanathar's Guide doesn't say you need to be a spellcaster. Since your DM alone decides the formula, it's 100% up to your DM whether or not you need a spellcaster. In that case, it's possible, if your DM decides it, that you can craft certain magic items with smithing tools alone.