Yes you are. If you are announcing an attempt to attack with sufficient specificity (who are you attacking? That’s your goal. what weapon are you attacking with? That’s your approach.) you’ve described what your character is doing. That’s about the degree of specificity that any action declaration demands. In the case of spells, the description is specified in the spell text. You’re saying magic words and/or performing magic hand motions and/or manipulating material foci to produce a specific magical effect, as specified in the spellblock.
Then the DM isn’t fulfilling their role. When you announce intent to kill a goblin with your sword, the DM should evaluate if this action could succeed (if the goblin is magically invulnerable to harm from swords for some reason, it can’t), if it can fail (if the goblin is incapacitated or otherwise incapable of preventing you from killing them with your sword, it can’t), and if there is a consequence for failure (in combat there always is because on a failure you’ve wasted a resource - your one action per turn. Out of combat, there might or might not be.) If all three things are not true, there’s no need to roll dice, the outcome is obvious and can simply be resolved narratively. The rules define what ability is appropriate to roll if one is called for and whether or not to add your Proficiency bonus based on the approach, just like they do for ability checks and skills.
Spells are a bit of a different case, as there is almost never uncertainty that the approach (the execution of the particular components of the spell) will achieve the goal (producing the effects of the spell). Generally, it is certain to succeed, unless you are in an antimagic field or something, in which case it is certain to fail. Counterspell can make a spellcasting action’s outcome uncertain, if the spell being cast is a higher level than the counterspell. Once the effect is produced, sometimes the target(s) have a chance to avoid its effects, so they make a saving throw. Sometimes it’s uncertain if a spell will hit its target, so you make a spell attack roll.