SMSTools ACTION
Add Contact to Group
Adds a new contact to an existing contact list. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's SMSTools account once, then configure and run Add Contact to Group from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "smstools-add-contact",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
smstools: { authProvisionId: "apn_xxxxxxx" },
phone: "Phone Number",
groupid: "Group ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "smstools-add-contact",
"configured_props": {
"smstools": { "authProvisionId": "apn_xxxxxxx" },
"phone": "Phone Number",
"groupid": "Group ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "smstools",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "smstools-add-contact",
arguments: {
phone: "Phone Number",
groupid: "Group ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
phone Phone Number | string | The phone number of the contact. Required |
groupid Group ID | string | The group ID where the contact should be added. Required Dynamic |
firstName First Name | string | First name of the contact. Optional |
lastName Last Name | string | Last name of the contact. Optional |
birthday Birthday | string | Birthday of the contact. Format: YYYY-MM-DD. Optional |
extra1 Extra 1 | string | Extra field 1 for the contact. Optional |
extra2 Extra 2 | string | Extra field 2 for the contact. Optional |
extra3 Extra 3 | string | Extra field 3 for the contact. Optional |
extra4 Extra 4 | string | Extra field 4 for the contact. Optional |
extra5 Extra 5 | string | Extra field 5 for the contact. Optional |
extra6 Extra 6 | string | Extra field 6 for the contact. Optional |
extra7 Extra 7 | string | Extra field 7 for the contact. Optional |
extra8 Extra 8 | string | Extra field 8 for the contact. Optional |
unsubscribed Unsubscribed | boolean | Indicates if the contact is unsubscribed. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- smstools-add-contact
- Version
- 0.0.2
- App
- SMSTools
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗