
Gandal |

The spell says an invisible creature can cut the ropes to drop a rope bridge,remotely trigger traps,summon monsters and having them attack etc. without losing the invisible condition.
And, as for the title,if an invisible PC wants to throw a tanglefoot bag at a foe? It isn't a direct attack (it doesn't inflict damage) but it requires a ranged touch attack.
It was my turn as player, and it came out as i wanted to hold a foe in place, since he constantly used the withdraw maneuver.My F elf magus was invisible and she were going to throw the tanglefoot bag, but in the end the cleric solved the problem with a Hold person spell,but my doubt remained.

Baelin |
If you have to make an attack roll, even if the attack inflicts no damage, it ends invisibility.
For the purpose of ending invisibility, a direct attack is defined as any effect that requires an attack roll or targets an enemy with the intention to harm or hinder them in any way. (This latter also includes spells such as Prayer or Web which affects enemies in some way or another.)
For purposes of this spell, an attack includes any spell targeting a foe or whose area or effect includes a foe . Exactly who is a foe depends on the invisible character's perceptions. Actions directed at unattended objects do not break the spell. Causing harm indirectly is not an attack. Thus, an invisible being can open doors, talk, eat, climb stairs, summon monsters and have them attack, cut the ropes holding a rope bridge while enemies are on the bridge, remotely trigger traps, open a portcullis to release attack dogs, and so forth. If the subject attacks directly, however, it immediately becomes visible along with all its gear. Spells such as bless that specifically affect allies but not foes are not attacks for this purpose, even when they include foes in their area.