The Gibbons-Hawking-York (GHY) term was added by hand to the Einstein-Hilbert action to establish a well-defined variational principle on spacetimes with boundaries. In string theory, the equations of motion of target spacetime are derived from the beta functions on the worldsheet, from which an action is subsequently inferred. In string field theory, the action is reconstructed from the off-shell amplitudes. Another approach, pioneered by Tseytlin, is the Non-Linear Sigma Model (NLSM) approach, in which the tree-level target spacetime action is directly derived from the sphere partition function by applying a method known as the T1 prescription. We now consider the sphere partition function on manifolds with a boundary (half-space, in particular), and show that the T1 prescription also yields boundary terms in the action. In this talk, I will primarily present the work done on the dilaton case (2406.00712) and partially state tentative results for the metric case (upcoming).